Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify github action versions and limit permissions #73

Merged
merged 1 commit into from
Jan 9, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 17 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
schedule:
- cron: "0 0 * * 1" # Each Monday

permissions:
contents: read
checks: write # allow write access to allow the golangci/golangci-lint-action to annotate code in the PR

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
Expand All @@ -22,23 +26,23 @@
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
- uses: actions/checkout@v4.2.2
- uses: actions/setup-go@v5.2.0
with:
go-version: "1.23.4" # update together with dev.dockerfile
- name: Debug with tmate SSH if enabled
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_ssh }}
uses: mxschmitt/action-tmate@v3
uses: mxschmitt/action-tmate@v3.19
Dismissed Show dismissed Hide dismissed
- run: make test-cover
- uses: codecov/codecov-action@v5
- uses: codecov/codecov-action@v5.1.2
Dismissed Show dismissed Hide dismissed
with:
token: ${{ secrets.CODECOV_TOKEN }}

test-latest-deps:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
- uses: actions/checkout@v4.2.2
- uses: actions/setup-go@v5.2.0
with:
go-version: "1.23.4" # update together with dev.dockerfile
- run: make test-latest-deps
Expand All @@ -47,29 +51,29 @@
name: "test go 1.22"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
- uses: actions/checkout@v4.2.2
- uses: actions/setup-go@v5.2.0
with:
go-version: "1.22"
- run: make test

lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
- uses: actions/checkout@v4.2.2
- uses: actions/setup-go@v5.2.0
with:
go-version: "1.23.4" # update together with dev.dockerfile
- uses: golangci/golangci-lint-action@v6
- uses: golangci/golangci-lint-action@v6.1.1
Dismissed Show dismissed Hide dismissed
with:
version: "v1.63.4" # update together with dev.dockerfile

check-tidy:
name: go mod tidy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
- uses: actions/checkout@v4.2.2
- uses: actions/setup-go@v5.2.0
with:
go-version: "1.23.4" # update together with dev.dockerfile
- run: make check-tidy
Loading