-
Notifications
You must be signed in to change notification settings - Fork 0
/
Taskfile.yml
53 lines (46 loc) · 1.14 KB
/
Taskfile.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
version: '3'
tasks:
default:
cmds:
- task: prepare
- task: test
- task: nancy
- task: graph
build-all:
desc: Build executable binary with GoReleaser.
cmds:
- goreleaser --snapshot --skip=publish --clean
test:
desc: Test and lint.
cmds:
- go mod verify
- go test -shuffle on ./...
- govulncheck ./...
- docker run --rm -v $(pwd):/app -w /app golangci/golangci-lint:latest golangci-lint run --enable gosec --timeout 10m0s ./...
sources:
- ./go.mod
- '**/*.go'
nancy:
desc: Check vulnerability of external packages with Nancy.
cmds:
- depm list -j | nancy sleuth -n
sources:
- ./go.mod
- '**/*.go'
prepare:
- go mod tidy -v -go=1.22
clean:
desc: Initialize module and build cache, and remake go.sum file.
cmds:
- rm -f ./go.sum
- go clean -cache
- go clean -modcache
graph:
desc: Make grapth of dependency modules.
cmds:
- depm m --dot --dot-config dot-config.toml | dot -Tpng -o ./dependency.png
sources:
- ./go.mod
- '**/*.go'
generates:
- ./dependency.png