-
Notifications
You must be signed in to change notification settings - Fork 0
/
Taskfile.yaml
49 lines (42 loc) · 1.05 KB
/
Taskfile.yaml
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
version: '3'
includes:
example:
taskfile: ./entfga/_examples/basic/
dir: ./entfga/_examples/basic/
tasks:
generate:
desc: generate the mock fga client
cmds:
- go generate ./...
go:lint:
desc: runs golangci-lint, the most annoying opinionated linter ever
cmds:
- golangci-lint run --config=.golangci.yaml --verbose --fix
go:test:
desc: runs and outputs results of created go tests
cmds:
- go test -v ./...
go:tidy:
desc: runs go mod tidy on the backend
aliases: [tidy]
cmds:
- go mod tidy
go:all:
aliases: [go]
desc: runs all go test and lint related tasks
cmds:
- task: go:tidy
- task: go:lint
- task: go:test
ci:
desc: a task that runs during CI
cmds:
- task: generate
- "git config --global --add safe.directory /workdir"
- |
status=$(git status --porcelain)
if [ -n "$status" ]; then
echo "detected git diff after running generate; please re-run tasks"
echo "$status"
exit 1
fi