-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathTaskfile.yml
66 lines (56 loc) · 1.55 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
version: '3'
vars:
PACKAGE: github.com/gopaytech/go-commons
COVERAGE_DIR: ./_output/coverage
VERSION:
sh: cat VERSION
CURRENT_DIR:
sh: pwd
tasks:
mkdir:
desc: Create required directory
cmds:
- mkdir -p {{.COVERAGE_DIR}}
status:
- test -p {{.COVERAGE_DIR}}
silent: true
vendor:
desc: Run Go vendor
cmds:
- echo {{.CURRENT_DIR}}
- go mod tidy
- go mod vendor
silent: true
test:
desc: Run test
deps: [ mkdir,vendor ]
cmds:
- go test -v -race -coverprofile={{.COVERAGE_DIR}}/coverage.out -covermode=atomic ./...
itest:
desc: Run integration test
deps: [ mkdir,vendor ]
cmds:
- go test -v -race -tags=integration -coverprofile={{.COVERAGE_DIR}}/coverage.out -covermode=atomic ./...
local-itest:
desc: Run local integration test
deps: [ mkdir,vendor ]
cmds:
- go test -v -race -tags=local,integration -coverprofile={{.COVERAGE_DIR}}/coverage.out -covermode=atomic ./...
- go tool cover -html={{.COVERAGE_DIR}}/coverage.out -o {{.COVERAGE_DIR}}/coverage.html
install-dev:
desc: Install development tools
cmds:
- go install github.com/vektra/mockery/[email protected]
gitlab-mock:
desc: Generate mock
dir: pkg/gitlab
cmds:
- mockery --all --case=underscore --output ./gitlab_mock --outpkg gitlab_mock
tmpl-mock:
desc: Generate mock
dir: pkg/tmpl
cmds:
- mockery --all --case=underscore --output ./tmpl_mock --outpkg tmpl_mock
mock:
desc: Generate mock
deps: [ gitlab-mock,tmpl-mock ]