-
Notifications
You must be signed in to change notification settings - Fork 0
/
Taskfile.yml
53 lines (43 loc) · 908 Bytes
/
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
# https://taskfile.dev
version: '3'
dotenv: [".fitness.env"]
vars:
CWD:
sh: git rev-parse --show-toplevel
APP:
sh: basename $PWD
PKG:
github.com/bzimmer/{{.APP}}
DIST:
"{{.CWD}}/dist"
tasks:
default:
cmds:
- task: fitness
clean:
desc: Remove build artifacts
cmds:
- rm -rf {{.DIST}}
dist:
desc: Create dist directory
cmds:
- mkdir -p {{.DIST}}
fitness:
desc: Run fitness
env:
BASE_URL: http://localhost:9010/fitness
cmds:
- go run cmd/fitness/*.go --port 9010 {{.CLI_ARGS}}
lint:
desc: Runs golint
cmds:
- golangci-lint -v run
snapshot:
desc: Build a snapshot
cmds:
- goreleaser release --snapshot --rm-dist
test:
desc: Run tests
deps: [dist]
cmds:
- go test {{.CLI_ARGS}} -race -count=1 -covermode atomic -coverprofile {{.DIST}}/coverage.txt {{.PKG}}