File tree 4 files changed +21
-8
lines changed
4 files changed +21
-8
lines changed Original file line number Diff line number Diff line change @@ -14,10 +14,10 @@ jobs:
14
14
name : lint
15
15
runs-on : ubuntu-latest
16
16
steps :
17
+ - uses : actions/checkout@v3
17
18
- uses : actions/setup-go@v3
18
19
with :
19
- go-version : ^1.18
20
- - uses : actions/checkout@v3
20
+ go-version-file : ' go.mod'
21
21
- name : golangci-lint
22
22
uses : golangci/golangci-lint-action@v3
23
23
with :
44
44
# skip-build-cache: true
45
45
- name : testing
46
46
run : go test -shuffle on ./...
47
+ - name : install govulncheck
48
+ run : go install golang.org/x/vuln/cmd/govulncheck@latest
49
+ - name : running govulncheck
50
+ run : govulncheck ./...
Original file line number Diff line number Diff line change 9
9
name : Vulnerability scanner
10
10
runs-on : ubuntu-latest
11
11
steps :
12
- - uses : actions/checkout@v2
13
- - uses : actions/setup-go@v2
12
+ - uses : actions/checkout@v3
13
+ - uses : actions/setup-go@v3
14
14
with :
15
- go-version : ^1.18
15
+ go-version : ^1.20
16
16
- name : WriteGoList
17
17
run : go list -json -m all > go.list
18
18
- name : Nancy
Original file line number Diff line number Diff line change 5
5
cmds :
6
6
- task : clean
7
7
- task : test
8
+ - task : nancy
8
9
9
10
test :
10
11
desc : Test and lint.
11
12
cmds :
12
13
- go mod verify
13
14
- go test -shuffle on ./...
14
- - docker run --rm -v $(pwd):/app -w /app golangci/golangci-lint:v1.46.2 golangci-lint run --enable gosec --timeout 3m0s ./...
15
+ - docker run --rm -v $(pwd):/app -w /app golangci/golangci-lint:v1.51.1 golangci-lint run --enable gosec --timeout 3m0s ./...
16
+ sources :
17
+ - ./go.mod
18
+ - ' **/*.go'
19
+
20
+ nancy :
21
+ desc : Check vulnerability of external packages with Nancy.
22
+ cmds :
23
+ - depm list -j | nancy sleuth -n
15
24
sources :
16
25
- ./go.mod
17
26
- ' **/*.go'
18
27
19
28
clean :
20
29
desc : Initialize module and build cache, and remake go.sum file.
21
30
cmds :
22
- - go mod tidy -v -go=1.18
31
+ - go mod tidy -v -go=1.20
Original file line number Diff line number Diff line change 1
1
module github.com/goark/pa-api
2
2
3
- go 1.18
3
+ go 1.20
4
4
5
5
require (
6
6
github.com/goark/errs v1.1.0
You can’t perform that action at this time.
0 commit comments