-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yml
More file actions
73 lines (62 loc) · 1.7 KB
/
Taskfile.yml
File metadata and controls
73 lines (62 loc) · 1.7 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
version: '3'
includes:
mdox: ./Taskfile.mdox.yml
tasks:
build:
desc: Build the project
cmds:
- go build -o bin/lessgo ./cmd/lessgo
test:
desc: "Run tests and collect coverage"
deps:
- fmt
env:
GOTOOLCHAIN: '{{.toolchain}}'
cmds:
- go test -timeout 5s -failfast -count=1 -cover -coverpkg=./... -coverprofile=pkg.cov ./...
bench:
desc: "Run benchmarks with multiple CPU configurations"
deps:
- fmt
env:
GOTOOLCHAIN: '{{.toolchain}}'
cmds:
- go test -bench=. -benchmem -benchtime=5s -cpu 1,2,4 -count=1 ./...
cover:
desc: "Show source coverage"
cmds:
- go-fsck extract . --include-sources
- go-fsck docs > docs/api.md
- go tool cover -func=pkg.cov | summary coverfunc --json > pkg.cov.json
- go-fsck extract --pretty-json ./...
- go-fsck coverage -c pkg.cov.json -o go-fsck.json
- go-fsck coverage --template=docs/testing-coverage.md.tpl -v > docs/testing-coverage.md
- perl -pi -e 's/github.com\/titpetric/titpetric/g' docs/testing-coverage.md
- task: mdox:fmt
test:fixture:
desc: Run fixture tests only with 10 iterations
cmds:
- go test -timeout 5s -race -failfast -count=10 ./testdata -v
test:lexer:
desc: Run lexer tests only
cmds:
- go test -timeout 5s ./parser -v
fmt:
desc: Format all Go files
cmds:
- goimports -w .
- go fmt ./...
fmt:less:
desc: Format LESS files using lessgo fmt command
cmds:
- task: build
- ./bin/lessgo fmt "{{.CLI_ARGS}}"
watch:
desc: Watch for changes and run tests
cmds:
- task: fmt
- task: test
default:
cmds:
- task: fmt
- task: test