forked from canonical/iot-identity
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTaskfile.yml
46 lines (43 loc) · 1.16 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
version: '3'
dotenv: ['{{.HOME}}/.device-management-env', '.env']
includes:
dev: "./taskfiles/k8s-dev.yml"
tasks:
precommit:
cmds:
- task: gofmt
- task: goimports
- task: lint
- task: test
- task: test-race
build:
desc: Build agent
vars:
GIT_SUMMARY:
sh: git describe --tags --dirty --always
cmds:
- go build -o identity -ldflags='-X github.com/everactive/iot-identity/version.Version={{.GIT_SUMMARY}}' bin/identity/identity.go
gofmt:
desc: Runs gofmt on every file in the project directory
cmds:
- find . -name \*.go -exec gofmt -w {} \;
goimports:
desc: Runs goimports on every file in the project directory
cmds:
- find . -name \*.go -exec goimports -w {} \;
lint:
desc: Run the golangci-lint on the repo
cmds:
- golangci-lint run
test:
desc: Run tests for the gateway controller
cmds:
- go test ./...
test-race:
desc: Run race detection tests
cmds:
- go test ./... -race
generate-docs:
desc: Generate documentation from terraform-docs
cmds:
- terraform-docs markdown table --output-file ./README.md ./deploy/