-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yaml
More file actions
74 lines (62 loc) · 1.31 KB
/
Taskfile.yaml
File metadata and controls
74 lines (62 loc) · 1.31 KB
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:
BINARY_NAME: binder
BUILD_DIR: build
tasks:
default:
desc: Build the project
cmds:
- task: build
build:
desc: Build the binder binary
cmds:
- go build -o {{.BUILD_DIR}}/{{.BINARY_NAME}} ./cmd/binder
sources:
- cmd/binder/*.go
- go.mod
- go.sum
generates:
- '{{.BUILD_DIR}}/{{.BINARY_NAME}}'
test:
desc: Run all tests
cmds:
- go test -v ./...
test:short:
desc: Run tests without verbose output
cmds:
- go test ./...
test:cover:
desc: Run tests with coverage report
cmds:
- go test -coverprofile={{.BUILD_DIR}}/coverage.out ./...
- go tool cover -html={{.BUILD_DIR}}/coverage.out -o {{.BUILD_DIR}}/coverage.html
generates:
- '{{.BUILD_DIR}}/coverage.out'
- '{{.BUILD_DIR}}/coverage.html'
clean:
desc: Remove build artifacts
cmds:
- rm -rf {{.BUILD_DIR}}
lint:
desc: Run golangci-lint
cmds:
- golangci-lint run ./...
fmt:
desc: Format Go code
cmds:
- go fmt ./...
vet:
desc: Run go vet
cmds:
- go vet ./...
mod:tidy:
desc: Tidy go modules
cmds:
- go mod tidy
all:
desc: Run fmt, vet, test, and build
cmds:
- task: fmt
- task: vet
- task: test:short
- task: build