-
Notifications
You must be signed in to change notification settings - Fork 8
/
Taskfile.yml
48 lines (40 loc) · 1009 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
version: '3'
includes:
ci:
taskfile: ./Taskfile_CI.yml
tasks:
lint:
desc: Lint code
cmds:
- golangci-lint run -c .golangci.yml
summary: Lint the project with golangci-lint
fmt:
desc: Run 'go fmt' to format the code
cmds:
- go fmt ./...
test:
desc: Run the tests
cmds:
- go test ./... -race -count=1
go-mod-tidy:
desc: Run 'go mod tidy' to clean up module files.
cmds:
- go mod tidy -v
doc:
desc: Run 'godoc', print docs url
cmds:
- |
godoc &
echo 'docs are open at:'
echo 'http://localhost:6060/pkg/github.com/CircleCI-Public/circle-policy-agent/'
wait
doc-open:
desc: Run 'godoc', open the docs url in your browser
cmds:
- sleep .5 && open 'http://localhost:6060/pkg/github.com/CircleCI-Public/circle-policy-agent/' &
- task: doc
check-go-mod:
desc: Check go.mod is tidy
cmds:
- go mod tidy -v
- git diff --exit-code -- go.mod go.sum