Skip to content

Commit c383426

Browse files
Update ci.yml
1 parent d598f38 commit c383426

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
env:
1919
# Ensure we build with the repo’s Go; helpful if using toolchain directives.
2020
GOTOOLCHAIN: local
21-
# Default: run vuln scan in CI (internet is available here).
21+
# Default: run vuln scan in CI.
2222
SKIP_VULN: "0"
2323
steps:
2424
- name: Checkout
@@ -27,7 +27,7 @@ jobs:
2727
- name: Setup Go
2828
uses: actions/setup-go@v5
2929
with:
30-
go-version: "1.24.x"
30+
go-version-file: go.mod
3131
cache: false # we’ll use explicit caches below
3232

3333
- name: Cache Go modules
@@ -42,13 +42,16 @@ jobs:
4242
run: |
4343
go version
4444
go env
45+
46+
- name: Clean Go build cache (defensive)
47+
run: go clean -cache -testcache
4548

4649
- name: Install golangci-lint (built with local toolchain)
4750
run: |
4851
GOBIN=$HOME/.local/bin GOTOOLCHAIN=local go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.61.0
4952
echo "$HOME/.local/bin" >> $GITHUB_PATH
5053
golangci-lint version
51-
54+
5255
- name: Make check (fmt, tidy, lint, unit tests, govulncheck)
5356
run: make check
5457

@@ -74,7 +77,7 @@ jobs:
7477
- name: Setup Go
7578
uses: actions/setup-go@v5
7679
with:
77-
go-version: "1.24.x"
80+
go-version-file: go.mod
7881
cache: false
7982

8083
- name: Cache Go modules
@@ -84,6 +87,9 @@ jobs:
8487
key: ${{ runner.os }}-gomod-${{ hashFiles('**/go.sum') }}
8588
restore-keys: |
8689
${{ runner.os }}-gomod-
90+
91+
- name: Clean Go build cache (defensive)
92+
run: go clean -cache -testcache
8793

8894
- name: Install golangci-lint (for make lint, if used)
8995
run: |

0 commit comments

Comments
 (0)