-
Notifications
You must be signed in to change notification settings - Fork 5
/
Taskfile.yml
89 lines (75 loc) · 1.76 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
78
79
80
81
82
83
84
85
86
87
88
89
version: '3'
silent: true
tasks:
default:
cmds:
- task --list-all
check:
desc: Run all project checks
cmds:
- echo "- Run all routines"
- task: tidy
- task: tools:install
- task: fmt
- task: lint
- task: install
- task: tests
- task: examples:update
tidy:
cmds:
- echo "- Tidy"
- go mod tidy
fmt:
desc: Run code formatter
cmds:
- echo "- Format"
- go fmt ./...
tools:install:
desc: Install required tools (into local project dir)
run: once
cmds:
- echo "- Run install tools"
- go run github.com/kazhuravlev/toolset/cmd/toolset@latest sync
lint:
desc: Run linter
cmds:
- echo "- Lint"
- task: 'tools:install'
- toolset run golangci-lint run --fix ./...
install:
run: once
cmds:
- echo "- Install"
- go install ./cmd/options-gen
tests:
cmds:
- echo "- Tests"
- go test -race -count 1 ./...
examples:update:
desc: Update examples directory
cmds:
- echo "- Update examples"
- task: examples:update:go-generate
- task: examples:update:go-generate-generics
- task: examples:update:go-generate-2options-1pkg
- task: examples:update:library
examples:update:library:
dir: examples/library
cmds:
- go run main.go
- go test .
examples:update:go-generate:
dir: examples/go-generate
cmds:
- task: "install"
- go generate ./...
examples:update:go-generate-generics:
dir: examples/go-generate-generics
cmds:
- task: "install"
- go generate ./...
examples:update:go-generate-2options-1pkg:
dir: examples/go-generate-2options-1pkg
cmds:
- task: "install"
- go generate ./...