@@ -18,21 +18,14 @@ jobs:
1818 os : [ ubuntu, windows, macos ]
1919 runs-on : ${{ matrix.os }}-latest
2020 steps :
21- - name : Setup Go
22- uses : actions/setup-go@v5
23- with :
24- go-version : 1.22.x
25- cache : false
2621 - name : Checkout code
2722 uses : actions/checkout@v4
2823 with :
2924 ref : ${{ github.event.pull_request.head.sha }}
30- - name : Go Cache
31- uses : actions/cache@v4
32- with :
33- path : ~/go/pkg/mod
34- key : ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
35- restore-keys : ${{ runner.os }}-go-
25+
26+ - name : Setup Go with cache
27+ uses : jfrog/.github/actions/install-go-with-cache@main
28+
3629 - name : Run Go vet
3730 run : go vet -v ./...
3831
@@ -42,32 +35,25 @@ jobs:
4235 steps :
4336 - name : Checkout Source
4437 uses : actions/checkout@v4
45- - name : Setup Go
46- uses : actions/setup-go@v5
47- with :
48- go-version : 1.22.x
49- cache : false
50- - name : Static Code Analysis
51- uses : golangci/golangci-lint-action@v4
52- with :
53- args : |
54- --timeout 5m --out-${NO_FUTURE}format colored-line-number --enable errcheck,gosimple,govet,ineffassign,staticcheck,typecheck,unused,gocritic,asasalint,asciicheck,errchkjson,exportloopref,forcetypeassert,makezero,nilerr,unparam,unconvert,wastedassign,usestdlibvars
5538
39+ - name : Setup Go with cache
40+ uses : jfrog/.github/actions/install-go-with-cache@main
41+
42+ - name : Run golangci linter
43+ uses : jfrog/.github/actions/golangci-lint@main
44+
5645 Go-Sec :
5746 name : Go-Sec ubuntu-latest
5847 runs-on : ubuntu-latest
5948 steps :
6049 - name : Checkout Source
6150 uses : actions/checkout@v4
62- - name : Setup Go
63- uses : actions/setup-go@v5
64- with :
65- go-version : 1.22.x
66- cache : false
67- - name : Run Gosec Security Scanner
68- uses : securego/gosec@master
69- with :
70- args : -exclude G204,G301,G302,G304,G306 -tests -exclude-dir \.*test\.* ./...
51+
52+ - name : Setup Go with cache
53+ uses : jfrog/.github/actions/install-go-with-cache@main
54+
55+ - name : Run Go-Sec scanner
56+ uses : jfrog/.github/actions/gosec-scanner@main
7157
7258 ShellCheck :
7359 name : Shellcheck
0 commit comments