-
Notifications
You must be signed in to change notification settings - Fork 185
68 lines (55 loc) · 2.29 KB
/
ci.yml
File metadata and controls
68 lines (55 loc) · 2.29 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
name: CI
on:
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- run: bun install --frozen-lockfile
- name: Lint
run: bun run lint
- name: Typecheck
run: bun run typecheck
# Phase 18 PR-6: enforce the additive + idempotent migration contract on
# every PR. Phantom tenants survive a snapshot-replace upgrade by
# rsyncing /app/data/ from the old clone to the new clone, so a
# destructive migration here would corrupt every live tenant on the
# next upgrade. The gate walks src/db/schema.ts and rejects DROP
# TABLE / DROP COLUMN / RENAME / non-idempotent CREATE statements.
- name: Migration safety gate
run: bun run src/db/check-migrations.ts
- name: Test
run: bun test
# Slice 15a: persona-work-plans drift guard. The in-VM phantom
# mirror at src/persona/work-plans.ts must stay byte-equal with
# the canonical fixture at scripts/shared/persona-work-plans.json
# in phantom-cloud-deploy. The verifier parses persona_id and
# required_integrations literals out of the TS file and diffs
# them against the canonical JSON. Strict mode flips on once the
# phantom-cloud-deploy fixture lands on main; until then this
# step skips on a missing fixture (the slice 15d-fixture PR is
# already open at #22).
- name: verify persona-work-plans drift
run: |
git clone --depth 1 https://github.com/ghostwright/phantom-cloud-deploy.git /tmp/pcd || true
if [ -f /tmp/pcd/scripts/shared/verify-persona-work-plans.sh ]; then
PERSONA_WORK_PLANS_VERIFY_STRICT=1 /tmp/pcd/scripts/shared/verify-persona-work-plans.sh
else
echo "phantom-cloud-deploy fixture not yet on main; skipping drift verification"
fi
- name: Install Chat UI Dependencies
working-directory: chat-ui
run: bun install --frozen-lockfile
- name: Chat UI Typecheck
working-directory: chat-ui
run: bun run typecheck
- name: Chat UI Test
working-directory: chat-ui
run: bun test
- name: Chat UI Build
run: bun run build:chat-ui