@@ -3,30 +3,11 @@ name: Golangci-lint
33on : [pull_request, merge_group]
44
55jobs :
6- detect-modules :
7- runs-on : ubuntu-latest
8- outputs :
9- modules : ${{ steps.set-modules.outputs.modules }}
10- steps :
11- - uses : actions/checkout@v5
12- - uses : actions/setup-go@v5
13- with :
14- go-version-file : go.mod
15- - id : set-modules
16- run : |
17- # Find all go.mod files and extract their directories
18- modules=$(find . -name "go.mod" -not -path "./vendor/*" | xargs dirname | jq -R -s -c 'split("\n") | map(select(. != ""))')
19- echo "modules=${modules}" >> $GITHUB_OUTPUT
20-
216 golangci-lint :
227 # Avoid running in merge queue since we run in PR's and have an optional
238 # label to skip lint issues on a PR which would be ignored in the merge queue.
249 if : ${{ github.event_name != 'merge_group' }}
25- needs : detect-modules
2610 runs-on : ubuntu-latest
27- strategy :
28- matrix :
29- module : ${{ fromJSON(needs.detect-modules.outputs.modules) }}
3011 permissions :
3112 id-token : write
3213 contents : read
@@ -44,11 +25,19 @@ jobs:
4425 version=$(grep '^golangci-lint ' .tool-versions | awk '{print $2}')
4526 echo "version=${version}" | tee -a "$GITHUB_OUTPUT"
4627
47- - name : golangci-lint ${{ matrix.module }}
28+ - name : golangci-lint
29+ if : ${{ always() && !contains(join(github.event.pull_request.labels.*.name, ' '), 'allow-lint-issues') }}
30+ # NOTE: Keep this version in sync with ACTION_CI_LINT_GO_GIT_TAG in ./script/lint.sh
31+ uses : smartcontractkit/.github/actions/ci-lint-go@ci-lint-go/3.0.0
32+ with :
33+ checkout-repo : false
34+ golangci-lint-version : v${{ steps.get-version.outputs.version }}
35+
36+ - name : golangci-lint keystore
4837 if : ${{ always() && !contains(join(github.event.pull_request.labels.*.name, ' '), 'allow-lint-issues') }}
4938 # NOTE: Keep this version in sync with ACTION_CI_LINT_GO_GIT_TAG in ./script/lint.sh
5039 uses : smartcontractkit/.github/actions/ci-lint-go@ci-lint-go/3.0.0
5140 with :
5241 checkout-repo : false
5342 golangci-lint-version : v${{ steps.get-version.outputs.version }}
54- go-directory : ${{ matrix.module }}
43+ go-directory : ./keystore
0 commit comments