-
Notifications
You must be signed in to change notification settings - Fork 64
Expand file tree
/
Copy pathTaskfile.yaml
More file actions
59 lines (48 loc) · 1.26 KB
/
Taskfile.yaml
File metadata and controls
59 lines (48 loc) · 1.26 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
# https://taskfile.dev
version: "3"
tasks:
default:
desc: List all available tasks
cmds:
- task --list
lint:install:
desc: Install golangci-lint
cmds:
- go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@latest
lint:
desc: Run base linters
cmds:
- golangci-lint run --path-mode=abs --config=".golangci.yml" --timeout=5m
lint:fix:
desc: Run base linters and fix issues
cmds:
- golangci-lint run --path-mode=abs --config=".golangci.yml" --timeout=5m --fix
fmt:
desc: Format code
cmds:
- gofumpt -l -w .
- goimports -l -w .
test:
desc: Run tests
cmds:
- go test -v -race ./...
test:coverage:
desc: Run tests with coverage
cmds:
- go test -v -race -coverprofile=coverage.out -covermode=atomic ./...
- go tool cover -html=coverage.out -o coverage.html
- echo "Coverage report generated at coverage.html"
test:update:
desc: Update golden test files
cmds:
- go test -update ./...
clean:
desc: Clean build artifacts and test cache
cmds:
- go clean -testcache
- rm -f coverage.out coverage.html
- find ./examples -type f -executable -delete
tidy:
desc: Tidy go.mod
cmds:
- go mod tidy