-
Notifications
You must be signed in to change notification settings - Fork 0
/
Taskfile.yml
51 lines (38 loc) · 1.11 KB
/
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
# https://taskfile.dev
version: '3'
vars:
V_PKGSITE: latest
V_UNCOVER: v0.0.1
V_GOTESTSUM: v1.12.0
COVERPROFILE: c.out
GOCMD_TEST: go run gotest.tools/gotestsum@{{.V_GOTESTSUM}} -- ./...
GOCMD_TEST_INTEGRATION: '{{.GOCMD_TEST}} -tags integration'
GOCMD_TEST_NOCACHE: '{{.GOCMD_TEST}} -count 1'
GOCMD_TEST_INTEGRATION_NOCACHE: '{{.GOCMD_TEST}} -tags integration -count 1'
tasks:
default:
- task: test:unit
test:
- task: test:unit
test:unit: '{{ .GOCMD_TEST }}'
test:unit-nocache: '{{ .GOCMD_TEST_NOCACHE }}'
test:integration: '{{ .GOCMD_TEST_INTEGRATION }}'
test:integration-nocache: '{{ .GOCMD_TEST_INTEGRATION_NOCACHE }}'
test:coverprofile:
sources:
- '**/*.go'
generates:
- '{{.COVERPROFILE}}'
cmds:
- go test ./... -coverprofile {{.COVERPROFILE}}
test:uncover:
deps:
- test:coverprofile
cmds:
- go run rsc.io/uncover@{{.V_UNCOVER}} {{.COVERPROFILE}}
install: go install ./cmd/...
update-deps:
- go get -u ./...
- go mod tidy
docs: go run golang.org/x/pkgsite/cmd/pkgsite@{{.V_PKGSITE}}
clean: rm -f {{.COVERPROFILE}}