-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yml
More file actions
93 lines (77 loc) · 1.95 KB
/
Taskfile.yml
File metadata and controls
93 lines (77 loc) · 1.95 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
version: '3'
vars:
BIN_DIR: '{{.ROOT_DIR}}/dist'
tasks:
default:
deps: [build]
proto:
desc: Regenerate protobuf code via buf
cmds:
- buf generate
web:install:
desc: Install web npm dependencies (idempotent)
dir: web
cmds:
- npm install --no-audit --no-fund
web:build:
desc: Build the web bundle into internal/web/dist
dir: web
deps: [web:install]
cmds:
- npm run build
web:lint:
desc: Lint web sources
dir: web
deps: [web:install]
cmds:
- npm run lint
web:test:
desc: Run web unit tests
dir: web
deps: [web:install]
cmds:
- npm test
ui:dev:
desc: Start Vite dev server (proxies to switchyardd)
dir: web
deps: [web:install]
cmds:
- npm run dev
build:
desc: Build both binaries
deps: [web:build]
cmds:
- go build -o {{.BIN_DIR}}/switchyardd ./cmd/switchyardd
- go build -o {{.BIN_DIR}}/switchyard ./cmd/switchyard
test:
desc: Run unit tests
cmds:
- go test ./...
test:race:
desc: Run tests with race detector
cmds:
- go test -race ./...
test:integration:
desc: Run integration tests (crash-safety, real disk)
cmds:
- go test -tags=integration ./...
test:fuzz:
desc: Run fuzz targets briefly
cmds:
- go test -run='^$' -fuzz=FuzzEventDecode -fuzztime=30s ./internal/eventstore
- go test -run='^$' -fuzz=FuzzFilterMatch -fuzztime=30s ./internal/eventstore
- go test -run='^$' -fuzz=FuzzFixtureParse -fuzztime=30s ./internal/eventstore
- go test -run='^$' -fuzz=Fuzz -fuzztime=30s ./internal/registry
- go test -run='^$' -fuzz=FuzzEnvelopeDecode -fuzztime=30s ./internal/carport
test:update-golden:
desc: Rewrite golden fixtures from current behavior
cmds:
- go test ./... -update
lint:
desc: Run golangci-lint
cmds:
- golangci-lint run ./...
tidy:
desc: go mod tidy
cmds:
- go mod tidy