-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathTaskfile.yml
57 lines (50 loc) · 1.11 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
54
55
56
57
version: '3'
tasks:
default:
cmds:
- task: clean
- task: sshql
- task: postgres
- task: mysql
- task: test
- task: nancy
sshql:
cmds:
- rm -f ./go.sum
- go mod tidy -v -go=1.19
postgres:
dir: pgdrv
cmds:
- rm -f ./go.sum
- go mod tidy -v -go=1.19
mysql:
dir: mysqldrv
cmds:
- rm -f ./go.sum
- go mod tidy -v -go=1.19
clean:
desc: Initialize module and build cache.
cmds:
- go clean -cache
- go clean -modcache
test:
desc: Test and lint.
cmds:
- go test -shuffle on ./...
- go test -shuffle on ./pgdrv/...
- go test -shuffle on ./mysqldrv/...
- docker run --rm -v $(pwd):/app -w /app golangci/golangci-lint:v1.49.0 golangci-lint run --enable gosec --timeout 3m0s ./...
sources:
- ./go.work
- '**/go.mod'
- '**/go.sum'
- '**/*.go'
nancy:
desc: Check vulnerability of external packages with Nancy.
cmds:
- depm list -j | nancy sleuth -n
sources:
- ./go.work
- '**/go.mod'
- '**/go.sum'
- '**/*.go'