chore: restore browser CI and rightsize runners #121
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: | |
| paths-ignore: | |
| - "docs/**" | |
| - "README.md" | |
| - "AGENTS.md" | |
| - ".codex/**" | |
| - ".opencode/**" | |
| push: | |
| branches: | |
| - main | |
| paths-ignore: | |
| - "docs/**" | |
| - "README.md" | |
| - "AGENTS.md" | |
| - ".codex/**" | |
| - ".opencode/**" | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| stage-1-quality: | |
| name: Stage 1 - Quality | |
| runs-on: blacksmith-2vcpu-ubuntu-2404 | |
| env: | |
| PUBLIC_CONVEX_URL: "https://example.convex.cloud" | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: 1.3.8 | |
| - name: Cache Bun + Turbo | |
| uses: actions/cache@v5 | |
| with: | |
| path: | | |
| ~/.bun/install/cache | |
| .turbo | |
| key: ${{ runner.os }}-bun-turbo-${{ hashFiles('**/bun.lock', '**/bun.lockb', 'package.json', 'apps/**/package.json', 'packages/**/package.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-bun-turbo- | |
| - name: Install dependencies | |
| run: bun install --frozen-lockfile | |
| - name: Ultracite check | |
| run: bun x ultracite check | |
| - name: Core manual inference tests | |
| run: | | |
| bun test \ | |
| packages/backend/convex/manualInferenceLogic.test.ts \ | |
| apps/web/src/lib/capability.test.ts \ | |
| apps/web/src/lib/mappers.test.ts | |
| - name: Publish summary | |
| if: always() | |
| run: | | |
| echo "## Stage 1 - Quality" >> "$GITHUB_STEP_SUMMARY" | |
| echo "" >> "$GITHUB_STEP_SUMMARY" | |
| echo "- ultracite check" >> "$GITHUB_STEP_SUMMARY" | |
| echo "- deterministic manual inference + mapping tests" >> "$GITHUB_STEP_SUMMARY" | |
| stage-2-browser-qa: | |
| name: Stage 2 - Browser QA | |
| needs: stage-1-quality | |
| runs-on: blacksmith-2vcpu-ubuntu-2404 | |
| env: | |
| PUBLIC_CONVEX_URL: "https://example.convex.cloud" | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: 1.3.8 | |
| - name: Cache Bun + Turbo | |
| uses: actions/cache@v5 | |
| with: | |
| path: | | |
| ~/.bun/install/cache | |
| .turbo | |
| key: ${{ runner.os }}-bun-turbo-${{ hashFiles('**/bun.lock', '**/bun.lockb', 'package.json', 'apps/**/package.json', 'packages/**/package.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-bun-turbo- | |
| - name: Cache Playwright browsers | |
| uses: actions/cache@v5 | |
| with: | |
| path: ~/.cache/ms-playwright | |
| key: ${{ runner.os }}-playwright-${{ hashFiles('**/bun.lock', '**/bun.lockb', 'package.json', 'apps/**/package.json', 'packages/**/package.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-playwright- | |
| - name: Install dependencies | |
| run: bun install --frozen-lockfile | |
| - name: Install agent-browser CLI | |
| run: npm install -g agent-browser@latest | |
| - name: Install Playwright Chromium | |
| run: npx playwright install --with-deps chromium | |
| - name: Run local browser QA smoke | |
| run: bun run qa:browser | |
| - name: Upload browser QA artifacts | |
| if: always() | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: browser-qa-local-${{ github.run_id }}-${{ github.run_attempt }} | |
| path: artifacts/browser-qa/** | |
| if-no-files-found: error | |
| - name: Publish summary | |
| if: always() | |
| run: | | |
| echo "## Stage 2 - Browser QA" >> "$GITHUB_STEP_SUMMARY" | |
| echo "" >> "$GITHUB_STEP_SUMMARY" | |
| echo "- local agent-browser smoke flow" >> "$GITHUB_STEP_SUMMARY" | |
| echo "- screenshots uploaded as workflow artifact" >> "$GITHUB_STEP_SUMMARY" | |
| echo "- Browserbase replay runs on the preview-validation workflow" >> "$GITHUB_STEP_SUMMARY" | |
| stage-3-build: | |
| name: Stage 3 - Build | |
| needs: stage-2-browser-qa | |
| runs-on: blacksmith-4vcpu-ubuntu-2404 | |
| env: | |
| PUBLIC_CONVEX_URL: "https://example.convex.cloud" | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: 1.3.8 | |
| - name: Cache Bun + Turbo | |
| uses: actions/cache@v5 | |
| with: | |
| path: | | |
| ~/.bun/install/cache | |
| .turbo | |
| key: ${{ runner.os }}-bun-turbo-${{ hashFiles('**/bun.lock', '**/bun.lockb', 'package.json', 'apps/**/package.json', 'packages/**/package.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-bun-turbo- | |
| - name: Install dependencies | |
| run: bun install --frozen-lockfile | |
| - name: Build | |
| run: bun run build | |
| - name: TUI compile smoke test | |
| run: | | |
| mkdir -p apps/tui/dist | |
| bun build apps/tui/src/index.tsx --compile --outfile apps/tui/dist/cable-intel-tui | |
| ./apps/tui/dist/cable-intel-tui --help | |
| - name: Publish summary | |
| if: always() | |
| run: | | |
| echo "## Stage 3 - Build" >> "$GITHUB_STEP_SUMMARY" | |
| echo "" >> "$GITHUB_STEP_SUMMARY" | |
| echo "- workspace build" >> "$GITHUB_STEP_SUMMARY" | |
| echo "- TUI compile smoke test" >> "$GITHUB_STEP_SUMMARY" | |
| checks: | |
| name: checks | |
| if: always() | |
| needs: | |
| - stage-1-quality | |
| - stage-2-browser-qa | |
| - stage-3-build | |
| runs-on: blacksmith-2vcpu-ubuntu-2404 | |
| steps: | |
| - name: Finalize staged CI result | |
| run: | | |
| if [ "${{ needs.stage-1-quality.result }}" != "success" ]; then | |
| echo "Stage 1 failed." | |
| exit 1 | |
| fi | |
| if [ "${{ needs.stage-2-browser-qa.result }}" != "success" ]; then | |
| echo "Stage 2 failed." | |
| exit 1 | |
| fi | |
| if [ "${{ needs.stage-3-build.result }}" != "success" ]; then | |
| echo "Stage 3 failed." | |
| exit 1 | |
| fi | |
| echo "All CI stages passed." |