-
Notifications
You must be signed in to change notification settings - Fork 16
/
Taskfile.yml
62 lines (52 loc) · 1.3 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
---
version: 3
tasks:
# invoked when `task` is run without arguments
default:
deps: [all]
all:
desc: "Format and lint code"
cmds:
- task: fmt
- task: test
- task: lint
init-tools:
dir: tools
cmds:
- go mod tidy
- go mod verify
- go generate -x
init:
desc: "Install development tools"
deps: [init-tools]
cmds:
- go mod tidy
- go mod verify
init-clean:
desc: "Clean all caches and re-install development tools"
cmds:
- bin/golangci-lint{{exeExt}} cache clean
- go clean -cache -testcache -modcache -fuzzcache
- task: init
fmt:
desc: "Format code"
cmds:
- bin/goimports{{exeExt}} -format-only -local=github.com/FerretDB/github-actions -w .
- bin/gofumpt{{exeExt}} -w .
test:
desc: "Run all unit tests in parallel"
cmds:
- go test -shuffle=on ./...
lint:
desc: "Run linters"
deps:
- lint-golangci-lint
cmds:
- bin/golangci-lint{{exeExt}} run --config=.golangci-new.yml
lint-golangci-lint:
cmds:
- bin/golangci-lint{{exeExt}} run --config=.golangci.yml
godocs:
desc: "Serve godoc documentation at http://127.0.0.1:6060/pkg/github.com/FerretDB/github-actions/?m=all"
cmds:
- bin/godoc{{exeExt}} -http=127.0.0.1:6060