Phase 18 PR-6: /health/build-info endpoint + migration-safety CI gate #176
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 | |
| - 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 |