Skip to content

Commit c6dc98b

Browse files
aledbfclaude
andcommitted
ci: keep golangci-lint's cache between runs
setup-go keeps only Go's caches, so every lint-and-test run analysed every package from nothing. golangci-lint keys its cache by content, so any older copy is safe to start from: saved under the commit, restored from the newest, main's for a pull request. Fixes #51 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 87d6119 commit c6dc98b

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

‎.github/workflows/go-cli.yml‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,16 @@ jobs:
7474
with:
7575
go-version-file: go.mod
7676

77+
# golangci-lint's analysis of each package, which setup-go does not keep, keyed by content
78+
# inside, so any older copy is safe to start from: saved under the commit, restored from the
79+
# newest - main's for a pull request.
80+
- name: Lint findings, from the last run
81+
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
82+
with:
83+
path: artifacts/golangci-lint
84+
key: golangci-lint-${{ github.sha }}
85+
restore-keys: golangci-lint-
86+
7787
- run: go tool task lint
7888
- run: go tool task spec:compliance
7989
- run: go tool task vuln

0 commit comments

Comments
 (0)