forked from vektra/mockery
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Taskfile.yml
77 lines (64 loc) · 1.32 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
67
68
69
70
71
72
73
74
75
76
77
version: "3"
tasks:
test:
cmds:
- go test -v -coverprofile=coverage.txt ./...
desc: run unit tests
sources:
- "**/*.go"
generates:
- coverage.txt
coverage:
deps: [test]
desc: run unit tests and create HTML coverage file
cmds:
- go tool cover -html=coverage.txt
fmt:
desc: auto-format all go files
sources:
- "**/*.go"
cmds:
- go fmt ./...
rm_mocks:
cmds:
- find . -name '*_mock.go' | xargs rm
- rm -rf mocks/
mocks:
desc: generate mockery mocks
deps: [rm_mocks]
cmds:
- go run .
docker:
desc: build the mockery docker image
cmds:
- docker build -t vektra/mockery .
mkdocs.install:
desc: install mkdocs and plugins
cmds:
- pip install -r docs/requirements.txt
mkdocs.serve:
desc: serve mkdocs locally
deps: [mkdocs.install]
cmds:
- mkdocs serve
lint:
desc: run all the defined linters
sources:
- "**/*.go"
cmds:
- go run github.com/golangci/golangci-lint/cmd/golangci-lint run
test.e2e:
desc: run end-to-end tests
sources:
- "**/*.go"
- "./.mockery.yaml"
cmds:
- ./e2e/run_all.sh
test.ci:
deps: [fmt, lint]
cmds:
- task: mocks
- task: test
- task: test.e2e
default:
deps: [test.ci]