Repository navigation
Expand file tree
/
Copy pathTaskfile.yml
More file actions
181 lines (149 loc) · 5.27 KB
/
Copy pathTaskfile.yml
File metadata and controls
181 lines (149 loc) · 5.27 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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
version: '3'
# One-liners for everything. Run `task --list` to see all tasks.
vars:
COMPOSE: docker compose --env-file .env -f infra/compose/docker-compose.yml
tasks:
default:
desc: List available tasks
cmds:
- task --list
silent: true
setup:
desc: Install all dependencies and git hooks
cmds:
- pnpm install
format:
desc: Format the whole repo with Prettier
cmds:
- pnpm format
format:check:
desc: Check formatting without writing
cmds:
- pnpm format:check
lint:
desc: Lint all workspace packages
cmds:
- pnpm lint
typecheck:
desc: Type-check all workspace packages
cmds:
- pnpm typecheck
test:
desc: Run all test suites
cmds:
- pnpm test
build:
desc: Build all workspace packages
cmds:
- pnpm build
verify:
desc: Full local merge gate — the exact commands CI runs
cmds:
- pnpm format:check
- pnpm lint
- pnpm typecheck
- pnpm test
- cmd: cd apps/intelligence && uv run ruff check . && uv run ruff format --check . && uv run mypy && uv run pytest
- cmd: cd packages/sdk-py && uv run ruff check . && uv run ruff format --check . && uv run mypy && uv run pytest
verify:e2e:
desc: 'End-to-end gate (requires: task up:core, matching CI; WIPES the local database)'
cmds:
# CI mode serves `next start`, which silently serves whatever build
# is on disk — build first so the gate always tests current code.
- pnpm turbo build --filter=@helio/web
- cd apps/web && CI=1 pnpm test:e2e
up:
desc: Start the full stack — everything (Postgres, Redis, Mailpit, ClickHouse, Redpanda, Temporal, MinIO)
cmds:
- cmd: test -f .env || cp .env.example .env
silent: true
- '{{.COMPOSE}} --profile full up -d --wait'
up:full:
desc: Alias of `task up` — start the full stack
cmds:
- task: up
up:core:
desc: Start only the minimal stack (Postgres, Redis, Mailpit) for a low-memory host
cmds:
- cmd: test -f .env || cp .env.example .env
silent: true
- '{{.COMPOSE}} --profile core up -d --wait'
up:observability:
desc: Start the observability stack (OTel collector, Prometheus, Grafana)
cmds:
- cmd: test -f .env || cp .env.example .env
silent: true
- '{{.COMPOSE}} --profile observability up -d --wait'
down:
desc: Stop the local stack (data volumes are kept)
cmds:
- '{{.COMPOSE}} --profile core --profile full --profile observability down'
screenshots:
desc: Regenerate docs/assets screenshots from a running app (BASE_URL overridable)
cmds:
- pnpm --filter @helio/web exec tsx scripts/screenshots.ts
diagrams:
desc: Render docs/diagrams/*.mmd to docs/assets/diagrams/*.svg (set PUPPETEER_EXECUTABLE_PATH locally)
cmds:
- bash docs/diagrams/render.sh
demo:video:
desc: Record the captioned A-to-Z product demo video (app + Mailpit + ClickHouse + intelligence must be up)
cmds:
- pnpm --filter @helio/web exec tsx scripts/demo-video.ts
release:images:
desc: 'Build + push every release image locally (sequential — OOM-safe; needs: docker login ghcr.io, VERSION=vX.Y.Z)'
cmds:
- |
set -eu
: "${VERSION:?set VERSION=vX.Y.Z}"
COMMIT=$(git rev-parse HEAD)
for svc in web api ingest tracking workers intelligence migrate backup updater; do
echo "── building helio-$svc:$VERSION"
docker build -f infra/docker/$svc.Dockerfile --build-arg HELIO_VERSION=$VERSION --build-arg HELIO_COMMIT=$COMMIT -t ghcr.io/achref-soua/helio-$svc:$VERSION .
docker push ghcr.io/achref-soua/helio-$svc:$VERSION
done
release:bundle:
desc: 'Build the pinned self-host install bundle (dist/helio-bundle-<v>.tar.gz)'
cmds:
- pnpm exec tsx scripts/release/build-bundle.ts {{.CLI_ARGS}}
product:guide:
desc: Render the Helio product guide PDF (same prereqs as demo:video)
cmds:
- pnpm --filter @helio/web exec tsx scripts/product-guide.ts
setup:guide:
desc: Render the non-technical setup guide PDF (uses docs/assets screenshots; no running app needed)
cmds:
- pnpm --filter @helio/web exec tsx scripts/setup-guide.ts
docs:
desc: Run the documentation site (Fumadocs) at :3002
cmds:
- pnpm --filter @helio/docs dev
logs:
desc: Tail logs of the local stack (task logs -- <service>)
cmds:
- '{{.COMPOSE}} logs -f {{.CLI_ARGS}}'
db:migrate:
desc: Create/apply database migrations (dev)
cmds:
- pnpm --filter @helio/db db:migrate
db:seed:
desc: Seed the demo workspace (idempotent)
cmds:
- pnpm --filter @helio/db db:seed
db:studio:
desc: Open Prisma Studio
cmds:
- pnpm --filter @helio/db db:studio
db:reset:
desc: Drop, recreate, migrate, and reseed the database
prompt: This wipes all local data. Continue?
cmds:
- pnpm --filter @helio/db exec prisma migrate reset --force
ch:migrate:
desc: Apply ClickHouse migrations (requires the full profile)
cmds:
- pnpm --filter @helio/ingest ch:migrate
loadtest:
desc: 'Ingestion load test (requires: task up:full, db:seed, ingest running, k6 installed)'
cmds:
- k6 run infra/k6/ingest.js