-
Notifications
You must be signed in to change notification settings - Fork 7
/
Taskfile.yaml
64 lines (49 loc) · 1.33 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# https://taskfile.dev
version: '3'
dotenv: ['.env']
vars:
HOSTNAME: github.com
NAMESPACE: terraform-providers
NAME: edgecast
BINARY: terraform-provider-{{.NAME}}
VERSION: 1.3.5
includes:
integration_test:
desc: runs all integration tests
taskfile: ./test/integration/Taskfile.yaml
dir: ./test/integration
tasks:
generate:
desc: generates documentation markdown
cmds:
- go generate
build:
desc: builds terraform-provider-edgecast
cmds:
- go build -o {{.BINARY}}
install:
desc: installs the source as the specified version of the terraform provider
cmds:
- task: build
- mkdir -p ~/.terraform.d/plugins/{{.HOSTNAME}}/{{.NAMESPACE}}/{{.NAME}}/{{.VERSION}}/{{OS}}_{{ARCH}}
- mv {{.BINARY}} ~/.terraform.d/plugins/{{.HOSTNAME}}/{{.NAMESPACE}}/{{.NAME}}/{{.VERSION}}/{{OS}}_{{ARCH}}
lint:
desc: runs lint against go files
cmds:
- golangci-lint run -v
test:
desc: runs go test against go files
cmds:
- go test -v -cover ./...
test-cover:
desc: 'runs tests and shows coverage report'
cmds:
- go test -v -race -coverprofile=coverage.out ./...
- go tool cover -html=coverage.out
default:
cmds:
- task: lint
- task: test
- task: generate
- task: install
- task: integration_test:default