-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathTaskfile.yml
More file actions
56 lines (44 loc) · 1.23 KB
/
Taskfile.yml
File metadata and controls
56 lines (44 loc) · 1.23 KB
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
version: "3"
vars:
VERSION: '{{.VERSION | default "0.0.1"}}'
tasks:
default:
deps: [test]
test:
deps: [fmtcheck]
cmds:
- go test ./... -cover -race
testint:
deps: [fmtcheck]
cmds:
- go test ./... -cover -race -tags=integration -count=1
cover:
deps: [fmtcheck]
cmds:
- go test ./... -coverpkg=./... -coverprofile=cover.out -tags=integration -covermode=atomic
- go tool cover -func=cover.out
- rm cover.out
fmt:
cmds:
- go fmt ./...
fmtcheck:
cmds:
- sh -c "'{{.ROOT_DIR}}/scripts/gofmtcheck.sh'"
lint:
deps: [fmtcheck]
cmds:
- docker run --env=GOFLAGS=-mod=vendor --rm -v {{.ROOT_DIR}}:/app -w /app golangci/golangci-lint:v2.11.1 golangci-lint -v run
deeplint:
deps: [fmtcheck]
cmds:
- docker run --env=GOFLAGS=-mod=vendor --rm -v {{.ROOT_DIR}}:/app -w /app golangci/golangci-lint:v2.11.1 golangci-lint run --exclude-use-default=false --enable-all -D dupl --build-tags integration
deps-start:
cmds:
- docker compose up -d
deps-stop:
cmds:
- docker compose down
ci:
deps: [fmtcheck]
cmds:
- go test ./... -race -cover -tags=integration -coverprofile=coverage.txt -covermode=atomic