-
Notifications
You must be signed in to change notification settings - Fork 1
90 lines (70 loc) · 3.05 KB
/
Copy pathci.yml
File metadata and controls
90 lines (70 loc) · 3.05 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
name: CI
# Typecheck, lint, and run the fast (model-free) unit suite on every PR to
# main. The suite runs against fakes/stubs — no real TTS, LLM, or network
# (specs/DESIGN.md §11.1), so it runs on plain Linux runners. The source-
# language gate runs here too, so a single --no-verify commit can't bypass it.
on:
pull_request:
branches: [main]
push:
branches: [main]
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
# pnpm before setup-node: the cache: pnpm resolver needs the binary to
# already be on PATH. The version comes from packageManager in
# package.json, so it is declared in exactly one place.
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 24
cache: pnpm
cache-dependency-path: pnpm-lock.yaml
- run: pnpm install --frozen-lockfile
- name: Source language gate
run: git ls-files '*.ts' '*.md' '*.yml' '*.yaml' '*.toml' | xargs node scripts/check-source-language.ts
- run: pnpm run typecheck
- run: pnpm run lint
- run: pnpm test
# Boot smoke: proves the entry point actually starts (argv parsing, app
# assembly, engine construction) — tests import modules but never boot.
# The runner is headless, so point ALSA's default device at the null sink
# or AudioContext dies with cpal DeviceUnavailable.
- name: Boot smoke
run: |
printf 'pcm.!default { type null }\nctl.!default { type null }\n' > ~/.asoundrc
timeout 120 node src/main.ts --brain stub --voice stub --no-music --no-bed --max-segments 1
# The spec-10 TUI client is a separate Bun package on purpose (§2.2): it stays
# outside the root package manager's workspace, so the root job above never
# installs or checks it. Its own gate is tsc under Bun — the same static
# contract the engine has, run by the runtime that actually executes the
# client. No test job: what a terminal frame looks like is not unit-assertable
# (§3.9), and the client's pure logic is held by the root suite.
tui:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: oven-sh/setup-bun@v2
- run: bun install --frozen-lockfile
working-directory: tui
# BOTH trees, because the client's typecheck crosses the shared-schema
# boundary: tui/src imports src/ipc.ts (§2.3's one source of truth for the
# wire), and tsc resolves THAT file's own `zod` import by walking up from
# src/ — which reaches the root node_modules, never tui's. Without this the
# job passes only on a machine that happens to have installed the root.
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 24
cache: pnpm
cache-dependency-path: pnpm-lock.yaml
- run: pnpm install --frozen-lockfile
- run: bun run typecheck
working-directory: tui