-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathTaskfile.yml
57 lines (54 loc) · 1.37 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
# https://taskfile.dev
version: "3"
tasks:
install-gofumpt:
status:
- which gofumpt
cmds:
# https://github.com/mvdan/gofumpt
- go install mvdan.cc/gofumpt@latest
install-golangci-lint:
status:
- which golangci-lint
cmds:
# https://golangci-lint.run/welcome/install/
- >
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh
| sh -s -- -b $(go env GOPATH)/bin v1.58.0
release:
cmds:
- test {{.CLI_ARGS}}
- git tag v{{.CLI_ARGS}}
- git push
- git push --tags
- gh release create --generate-notes v{{.CLI_ARGS}}
format:
cmds:
- task: install-gofumpt
- gofumpt -w .
lint:
cmds:
- task: install-golangci-lint
- golangci-lint run
test:
cmds:
- go test -count 1 ./...
test-examples:
cmds:
- firefly_cli build ./_examples/image
- firefly_cli build ./_examples/render_line
- firefly_cli build ./_examples/sprite
- firefly_cli build ./_examples/text
- firefly_cli build ./_examples/touchpad
- firefly_cli build ./_examples/triangle
- firefly_cli build ./_examples/audio_sine
all:
desc: run all code formatters, linters, and tests
cmds:
- task: format
- task: lint
- task: test
- task: test-examples
default:
cmds:
- task: all