-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yaml
More file actions
127 lines (106 loc) · 2.31 KB
/
Taskfile.yaml
File metadata and controls
127 lines (106 loc) · 2.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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
version: '3'
vars:
BINARY_NAME: fastmail-cli
BUILD_DIR: ./bin
MAIN_PKG: ./cmd/fastmail-cli
tasks:
default:
desc: Show available tasks
cmds:
- task --list
build:
desc: Build the binary
cmds:
- go build -o {{.BUILD_DIR}}/{{.BINARY_NAME}} {{.MAIN_PKG}}
sources:
- '**/*.go'
- go.mod
- go.sum
generates:
- '{{.BUILD_DIR}}/{{.BINARY_NAME}}'
test:
desc: Run all tests
cmds:
- go test -race -cover ./...
test:coverage:
desc: Run tests with coverage report
cmds:
- go test -race -coverprofile=coverage.out ./...
- go tool cover -html=coverage.out -o coverage.html
test:bdd:
desc: Run BDD integration tests
cmds:
- go test -tags integration -race -v ./test/integration/
test:all:
desc: Run all tests (unit + BDD)
cmds:
- task: test
- task: test:bdd
lint:
desc: Run linters
cmds:
- golangci-lint run ./...
lint:fix:
desc: Run linters and fix issues
cmds:
- golangci-lint run --fix ./...
generate:
desc: Run go generate
cmds:
- go generate ./...
mocks:
desc: Generate mocks with mockery
cmds:
- mockery
tidy:
desc: Tidy go modules
cmds:
- go mod tidy
clean:
desc: Clean build artifacts
cmds:
- rm -rf {{.BUILD_DIR}}
- rm -f coverage.out coverage.html
all:
desc: Run lint, test, and build
cmds:
- task: lint
- task: test
- task: build
# Git hooks
hooks:install:
desc: Install git hooks via lefthook
cmds:
- lefthook install
hooks:uninstall:
desc: Uninstall git hooks via lefthook
cmds:
- lefthook uninstall
# Documentation tasks
docs:build:
desc: Build documentation site
dir: docs/site
cmds:
- zensical build
sources:
- '**/*.md'
- '.zensical.yaml'
generates:
- '_site/**/*'
docs:serve:
desc: Serve documentation locally
dir: docs/site
cmds:
- zensical serve
release:check:
desc: Validate GoReleaser config
cmds:
- goreleaser check
release:snapshot:
desc: Build a local snapshot release (no publish)
cmds:
- goreleaser release --snapshot --clean
docs:clean:
desc: Clean documentation build artifacts
cmds:
- rm -rf docs/site/_site