-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yml
More file actions
57 lines (47 loc) · 979 Bytes
/
Copy pathTaskfile.yml
File metadata and controls
57 lines (47 loc) · 979 Bytes
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:
desc: List tasks
cmds:
- task --list
silent: true
build:
desc: Compile every package
cmds:
- go build ./...
test:
desc: Run tests with the race detector
cmds:
- go test ./... -race -count=1
cover:
desc: Run tests and print coverage
cmds:
- go test ./... -cover
cover-html:
desc: Generate and open an HTML coverage report
cmds:
- go test ./... -coverprofile=coverage.out
- go tool cover -html=coverage.out
vet:
desc: Run go vet
cmds:
- go vet ./...
lint:
desc: Run golangci-lint (install if missing)
cmds:
- golangci-lint run ./...
fmt:
desc: Format all Go source
cmds:
- gofmt -w -s .
tidy:
desc: Tidy and verify go.mod
cmds:
- go mod tidy
- go mod verify
check:
desc: Full pre-commit gate (fmt + vet + test)
cmds:
- task: fmt
- task: vet
- task: test