-
-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathTaskfile.yml
More file actions
78 lines (69 loc) Β· 2.15 KB
/
Taskfile.yml
File metadata and controls
78 lines (69 loc) Β· 2.15 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
# β β
# β IMPORTANT NOTE β
# β β
# β This file is synced with https://github.com/atomicgo/template β
# β β
# β Please apply all changes to the template repository β
# β β
# βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
version: "3"
tasks:
test:
desc: Run all tests
env:
CGO_ENABLED: 1
sources:
- "**/*.go"
- go.mod
- go.sum
cmds:
- go test -race ./...
release:patch:
desc: Create and push the next patch release tag
deps: [test]
cmds:
- bash scripts/release-tag.sh --patch
release:minor:
desc: Create and push the next minor release tag
deps: [test]
cmds:
- bash scripts/release-tag.sh --minor
release:major:
desc: Create and push the next major release tag
deps: [test]
cmds:
- bash scripts/release-tag.sh --major
benchmark:
desc: Run all benchmarks
aliases: [bench]
cmds:
- go test -bench=. ./...
tdd:
desc: Test Driven Development - Watch tests
env:
CGO_ENABLED: 1
watch: true
sources:
- "**/*.go"
cmds:
- go test -race ./...
lint:
sources:
- "**/*.go"
- go.mod
- go.sum
- .golangci.yml
desc: Run all linters
cmds:
- golangci-lint run
lint:fix:
desc: Run all linters and apply automatic fixes
sources:
- "**/*.go"
- go.mod
- go.sum
- .golangci.yml
cmds:
- go mod tidy
- golangci-lint run --fix