-
Notifications
You must be signed in to change notification settings - Fork 0
/
Taskfile.yml
74 lines (65 loc) · 1.6 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
---
version: '3'
vars:
SEMVER: 'v0.8.0'
includes:
containers:
taskfile: ./.dagger-ci/Taskfile.yml
dir: ./.dagger-ci
optional: true
examples:
taskfile: ./tests/Taskfile.yml
optional: true
vars:
SEMVER: '{{.SEMVER}}'
tasks:
build-go-binary:
desc: Template task to build a go binary
dir: action
cmds:
- go build -ldflags="-s -w" -o ../bin/firmware-action-{{OS}}-{{ARCH}}-{{.SEMVER}}
env:
CGO_ENABLED: 0
sources:
- ./**/*.go
generates:
- ../bin/firmware-action-{{OS}}-{{ARCH}}-{{.SEMVER}}
lint:
desc: Run the linters
dir: action
cmds:
- revive ./...
- go vet ./...
- staticcheck -fail "" ./...
- golangci-lint run --issues-exit-code 0 ./...
format:
desc: Run gofumt (fork of gofmt, stricter)
cmds:
- gofumpt -w action
test:
desc: Run tests
dir: action
cmds:
- go test {{.CLI_ARGS}} -race -timeout 60m -shuffle=on -covermode=atomic -coverprofile coverage.out ./...
- go tool cover -func=coverage.out
- go tool cover -html=coverage.out -o coverage.html
godocs:
desc: Start godocs http server
dir: action
cmds:
- godoc -http=:6060
build-mdbook:
desc: Build mdBook
dir: docs
cmds:
- mdbook build
build-mdbook-watch:
desc: Build mdBook with watch
dir: docs
cmds:
- mdbook watch
merge-json-configs:
desc: Merge all json configuration files in tests directory (for Docs purposes)
dir: tests
cmds:
- jq -s 'reduce .[] as $item ({}; . * $item)' example_config__*.json > example_config.json