@@ -24,15 +24,18 @@ jobs:
2424 golangci :
2525 env :
2626 # for private repo access
27- GOPRIVATE : github.com/initia-labs/*
27+ GOPRIVATE : github.com/initia-labs
2828 GITHUB_ACCESS_TOKEN : ${{ secrets.GH_READ_TOKEN }}
29+ GOLANGCI_LINT_VERSION : v1.59.1
2930 name : golangci-lint
3031 runs-on : ubuntu-latest
3132 steps :
32- - uses : actions/setup-go@v4
33+ - uses : actions/checkout@v4
34+ - uses : actions/setup-go@v5
3335 with :
3436 go-version : 1.22
35- - uses : technote-space/get-diff-action@v5
37+ check-latest : true
38+ -
uses :
technote-space/[email protected] 3639 id : git_diff
3740 with :
3841 PATTERNS : |
@@ -41,26 +44,43 @@ jobs:
4144 go.sum
4245 # for private repo access
4346 -
run :
git config --global url.https://${GITHUB_ACCESS_TOKEN}:[email protected] /.insteadOf https://github.com/ 44- - name : run go linters
47+ # install golangci-lint
48+ - run : go install github.com/golangci/golangci-lint/cmd/golangci-lint@${GOLANGCI_LINT_VERSION}
49+ - name : run go linters (long)
50+ if : env.GIT_DIFF
51+ id : lint_long
4552 run : |
46- make tools
4753 make lint
48- if : env.GIT_DIFF
54+ -
uses :
technote-space/[email protected] 55+ if : steps.lint_long.outcome == 'skipped'
56+ with :
57+ PATTERNS : |
58+ **/**.go
59+ go.mod
60+ go.sum
61+ - name : run go linters (short)
62+ if : steps.lint_long.outcome == 'skipped' && env.GIT_DIFF
63+ run : |
64+ make lint
65+ env :
66+ GIT_DIFF : ${{ env.GIT_DIFF }}
67+ LINT_DIFF : 1
4968 # Use --check or --exit-code when available (Go 1.19?)
5069 # https://github.com/golang/go/issues/27005
5170 tidy :
5271 env :
5372 # for private repo access
54- GOPRIVATE : github.com/initia-labs/*
73+ GOPRIVATE : github.com/initia-labs,github.com/skip-mev/slinky
5574 GITHUB_ACCESS_TOKEN : ${{ secrets.GH_READ_TOKEN }}
5675 runs-on : ubuntu-latest
5776 name : tidy
5877 steps :
59- - uses : actions/checkout@v3
78+ - uses : actions/checkout@v4
6079 - name : Setup go
61- uses : actions/setup-go@v4
80+ uses : actions/setup-go@v5
6281 with :
6382 go-version : 1.22
83+ check-latest : true
6484 # for private repo access
6585 -
run :
git config --global url.https://${GITHUB_ACCESS_TOKEN}:[email protected] /.insteadOf https://github.com/ 6686 - run : |
0 commit comments