Skip to content

Commit 47151af

Browse files
committed
fix CI workflow caching by reordering checkout and setup-go steps
- move checkout step before setup-go to enable proper Go module caching - update actions/checkout to v4 and actions/setup-go to v5 - update golangci-lint-action to v7 with version v2.6 - remove deprecated go get -v (dependencies auto-download with go test)
1 parent 494ae2a commit 47151af

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,31 +11,30 @@ jobs:
1111
runs-on: ubuntu-latest
1212

1313
steps:
14-
- name: set up go 1.23
15-
uses: actions/setup-go@v3
14+
- name: checkout
15+
uses: actions/checkout@v4
16+
17+
- name: set up go
18+
uses: actions/setup-go@v5
1619
with:
1720
go-version: "1.23"
1821
id: go
1922

20-
- name: checkout
21-
uses: actions/checkout@v3
22-
2323
- name: build and test
2424
run: |
25-
go get -v
2625
go test -timeout=60s -race -covermode=atomic -coverprofile=$GITHUB_WORKSPACE/profile.cov_tmp
2726
cat $GITHUB_WORKSPACE/profile.cov_tmp | grep -v "_mock.go" > $GITHUB_WORKSPACE/profile.cov
2827
go build -race
2928
3029
- name: golangci-lint
3130
uses: golangci/golangci-lint-action@v7
3231
with:
33-
version: v2.1.6
32+
version: v2.6
3433

35-
- name: install goveralls
34+
- name: install goveralls
3635
run: go install github.com/mattn/goveralls@latest
3736

3837
- name: submit coverage
3938
run: $(go env GOPATH)/bin/goveralls -service="github" -coverprofile=$GITHUB_WORKSPACE/profile.cov
4039
env:
41-
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40+
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)