Refactor channel interactions into adapter pattern (Phase 1) #217
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |