-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yml
More file actions
83 lines (68 loc) · 1.93 KB
/
Taskfile.yml
File metadata and controls
83 lines (68 loc) · 1.93 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
version: '3'
vars:
BINARY_NAME: cssgen
MAIN_PATH: ./cmd/cssgen
tasks:
default:
desc: Show available tasks
cmds:
- task --list
build:
desc: Build cssgen binary
cmds:
- go build -o bin/{{.BINARY_NAME}} {{.MAIN_PATH}}
build:all:
desc: Build for all platforms
cmds:
- GOOS=linux GOARCH=amd64 go build -o bin/{{.BINARY_NAME}}-linux-amd64 {{.MAIN_PATH}}
- GOOS=linux GOARCH=arm64 go build -o bin/{{.BINARY_NAME}}-linux-arm64 {{.MAIN_PATH}}
- GOOS=darwin GOARCH=amd64 go build -o bin/{{.BINARY_NAME}}-darwin-amd64 {{.MAIN_PATH}}
- GOOS=darwin GOARCH=arm64 go build -o bin/{{.BINARY_NAME}}-darwin-arm64 {{.MAIN_PATH}}
- GOOS=windows GOARCH=amd64 go build -o bin/{{.BINARY_NAME}}-windows-amd64.exe {{.MAIN_PATH}}
test:
desc: Run tests
cmds:
- go test -v -race ./...
test:coverage:
desc: Run tests with coverage report
cmds:
- go test -v -race -coverprofile=coverage.txt -covermode=atomic ./...
- go tool cover -html=coverage.txt -o coverage.html
lint:
desc: Run linter
cmds:
- golangci-lint run
lint:fix:
desc: Run linter with auto-fix
cmds:
- golangci-lint run --fix
check:
desc: Run all checks (test + lint)
cmds:
- task: test
- task: lint
install:
desc: Install cssgen to $GOPATH/bin
cmds:
- go install {{.MAIN_PATH}}
clean:
desc: Clean build artifacts and coverage reports
cmds:
- rm -rf bin/
- rm -f coverage.txt coverage.html
fmt:
desc: Format all Go code
cmds:
- go fmt ./...
mod:tidy:
desc: Tidy go.mod and go.sum
cmds:
- go mod tidy
mod:verify:
desc: Verify module dependencies
cmds:
- go mod verify
example:
desc: Run cssgen on testdata
cmds:
- go run {{.MAIN_PATH}} generate --source ./internal/cssgen/testdata --output-dir /tmp/cssgen-example --package example --include "**/*.css" --verbose