-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathTaskfile.yaml
49 lines (41 loc) · 1.3 KB
/
Taskfile.yaml
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
version: '3'
tasks:
build:
desc: Build ain as a binary in the root folder
cmds:
- go build -o ain cmd/ain/main.go
build:release:
desc: Builds all release binaries using goreleaser
cmds:
- goreleaser release --clean --snapshot
run:
desc: runs develop version of ain with arguments
cmds:
- go run cmd/ain/main.go {{.CLI_ARGS}}
run:stdsplit:
desc: runs develop version of ain and annotates stdout, stderr
cmds:
- "go run cmd/ain/main.go {{.CLI_ARGS}} > >(sed 's/^/(o): /') 2> >(sed 's/^/(e): /' >&2)"
test:
desc: Run tests
cmds:
- go test ./...
test:e2e:files:
desc: Run e2e tests for files specified as arguments
cmds:
- go test test/e2e/e2e_test.go -- {{.CLI_ARGS}}
test:cover:
desc: Run tests with coverage
env:
E2EGOCOVERDIR: "{{.PWD}}/cov/e2e"
cmds:
- rm -r {{.PWD}}/cov/
- mkdir -p {{.PWD}}/cov/unit {{.PWD}}/cov/e2e
- go test -cover ./... -args -test.gocoverdir="{{.PWD}}/cov/unit"
- go tool covdata textfmt -i=./cov/unit,./cov/e2e -o cov/profile.out
- go tool cover -html=cov/profile.out -o cov/coverage.html
- xdg-open cov/coverage.html
update:docs:
desc: Update README.md toc
cmds:
- npx doctoc --github --notitle --maxlevel=2 --update-only README.md