Skip to content

Commit 45aaa1e

Browse files
committed
cache golangci-lint
1 parent 9865c38 commit 45aaa1e

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

.github/workflows/ci.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,20 @@ jobs:
102102

103103
- uses: ./.github/actions/setup-node
104104

105+
- name: Get golangci-lint cache dir
106+
run: |
107+
dir=$(golangci-lint cache status | awk '/Dir/ { print $2 }')
108+
echo "LINT_CACHE_DIR=$dir" >> $GITHUB_ENV
109+
110+
- name: golangci-lint cache
111+
uses: buildjet/cache@v3
112+
with:
113+
path: |
114+
${{ env.LINT_CACHE_DIR }}
115+
key: golangci-lint-${{ runner.os }}-${{ hashFiles('**/*.go') }}
116+
restore-keys: |
117+
golangci-lint-${{ runner.os }}-
118+
105119
# Check for any typos
106120
- name: Check for typos
107121
uses: crate-ci/typos@v1.14.12

.golangci.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,9 +199,6 @@ issues:
199199
max-issues-per-linter: 0
200200
max-same-issues: 0
201201

202-
new: true
203-
new-from-rev: origin/main
204-
205202
run:
206203
skip-dirs:
207204
- node_modules

0 commit comments

Comments
 (0)