forked from Qovery/pleco
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Taskfile.yml
47 lines (40 loc) · 945 Bytes
/
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
# https://taskfile.dev
version: '3'
vars:
BINARY_FOLDER: bin
BINARY_NAME: pleco
GOLANGCI_LINT_VERSION: v1.46.2
dotenv: ['.env']
tasks:
build:
desc: Build pleco binary
cmds:
- go build -v -o {{.BINARY_FOLDER}}/{{.BINARY_NAME}}
sources:
- "**/*.go"
- go.mod
- go.sum
generates:
- '{{.BINARY_FOLDER}}/{{.BINARY_NAME}}'
test:
desc: Run acceptance tests
cmds:
- go test -v -cover ./... {{.CLI_ARGS}}
lint:
desc: Run linters
deps:
- install-golangci-lint
cmds:
- golangci-lint run ./...
sources:
- "**/*.go"
- go.mod
- go.sum
- .golangci.yml
install-golangci-lint:
desc: Install the golangci-lint tool
cmds:
- go install github.com/golangci/golangci-lint/cmd/golangci-lint@{{.GOLANGCI_LINT_VERSION}}
status:
- which golangci-lint
- golangci-lint version | grep {{.GOLANGCI_LINT_VERSION}}