File tree Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Go Lint
2+
3+ on :
4+ push :
5+ branches :
6+ - " **" # Run on push to any branch
7+ pull_request :
8+ branches :
9+ - " **" # Run on any pull request, regardless of the source branch
10+
11+ jobs :
12+ lint :
13+ name : Lint Go code
14+ runs-on : ubuntu-latest
15+
16+ steps :
17+ - name : Checkout code
18+ uses : actions/checkout@v3
19+
20+ - name : Set up Go
21+ uses : actions/setup-go@v3
22+ with :
23+ go-version : " 1.20" # Specify your Go version here
24+
25+ - name : Cache Go modules
26+ uses : actions/cache@v3
27+ with :
28+ path : |
29+ ~/.cache/go-build
30+ ~/.go/pkg/mod
31+ key : ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}
32+ restore-keys : |
33+ ${{ runner.os }}-go-mod-
34+
35+ - name : Install golangci-lint
36+ run : |
37+ curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin
38+
39+ - name : Run golangci-lint
40+ run : |
41+ golangci-lint run
You can’t perform that action at this time.
0 commit comments