-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathTaskfile.yml
More file actions
104 lines (91 loc) · 2.24 KB
/
Taskfile.yml
File metadata and controls
104 lines (91 loc) · 2.24 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
version: '3'
tasks:
build:
desc: Build the complete binary with embedded frontend (set MIXPANEL_TOKEN env var to enable telemetry)
deps: [build:frontend]
cmds:
- go build -ldflags="-X 'runbooks/api/telemetry.MixpanelToken={{.MIXPANEL_TOKEN}}'" -o runbooks .
sources:
- "**/*.go"
- web/dist/**/*
generates:
- runbooks
build:frontend:
desc: Build the frontend (creates web/dist)
dir: web
env:
VITE_MIXPANEL_TOKEN: "{{.MIXPANEL_TOKEN}}"
cmds:
- bun install
- bun run build
sources:
- "**/*.ts"
- "**/*.tsx"
- "**/*.css"
- package.json
generates:
- dist/**/*
clean:
desc: Remove build artifacts
cmds:
- rm -rf web/dist
- rm -f runbooks
dev:frontend:
desc: "Run the frontend dev server (Vite) - use with dev:backend in another terminal"
dir: web
cmds:
- bun run dev
dev:backend:
desc: "Run the backend API server - usage: task dev:backend RUNBOOK_PATH=path/to/runbook"
cmds:
- go run . serve {{.RUNBOOK_PATH | default "testdata/my-first-runbook"}}
test:
desc: Run all tests (frontend, backend, runbooks, and docs)
cmds:
- task: test:backend
- task: test:frontend
- task: test:runbooks
- task: test:docs
test:backend:
desc: Run Go backend tests
cmds:
- go test ./...
test:frontend:
desc: Run frontend tests (vitest)
dir: web
cmds:
- bun install
- bun run test
test:docs:
desc: Run docs tests (spellcheck and broken link check)
dir: docs
cmds:
- bun install
- bun run spellcheck
- bun run build
- bun run linkcheck
test:runbooks:
desc: Run automated tests for demo runbooks
deps: [build]
cmds:
- ./runbooks test ./testdata/...
test:e2e:
desc: Run Playwright end-to-end tests
deps: [build]
dir: web
cmds:
- bun install
- bunx playwright test
docs:spellcheck:
desc: Run spellcheck on documentation
dir: docs
cmds:
- bun install
- bun run spellcheck
docs:linkcheck:
desc: Check for broken links in documentation (builds first)
dir: docs
cmds:
- bun install
- bun run build
- bun run linkcheck