Phase 1A: experience and research profile #14
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 | |
| # Pull requests validate feature branches before merge; the merged result is | |
| # validated again on protected main. This deliberately avoids duplicate runs | |
| # for both the push and pull-request event on every feature branch. | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| push: | |
| branches: | |
| - main | |
| # Repository-default GITHUB_TOKEN permissions are not needed for anything in | |
| # this workflow beyond reading the checked-out code. | |
| permissions: | |
| contents: read | |
| jobs: | |
| frontend: | |
| name: Frontend (lint, types, tests, build) | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: app | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 | |
| with: | |
| node-version-file: .nvmrc | |
| cache: npm | |
| cache-dependency-path: app/package-lock.json | |
| - run: npm ci | |
| - run: npm run format:check | |
| - run: npm run lint | |
| - run: npm run typecheck | |
| - run: npm run test | |
| - run: npm run build | |
| database: | |
| name: Database (migrations, RLS, pgTAP, API integration) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 | |
| with: | |
| node-version-file: .nvmrc | |
| # Pinned to the exact version verified locally during Phase 0 | |
| # development (docs/DEPLOYMENT_STRATEGY.md records this) -- never | |
| # `latest`, so a CLI update can't silently change CI behavior. | |
| - uses: supabase/setup-cli@46f7f98c7f948ad727d22c1e67fab04c223a0520 # v3.0.0 | |
| with: | |
| version: 2.109.1 | |
| - name: Start local Supabase stack | |
| run: supabase start | |
| - name: Reset database from empty (applies every migration) | |
| run: supabase db reset | |
| - name: Verify Phase 0-to-Phase 1A migration compatibility | |
| run: ./supabase/scripts/migration-compatibility-test.sh | |
| - name: Verify profile-core-to-experience migration compatibility | |
| run: ./supabase/scripts/work-experience-migration-compatibility-test.sh | |
| - name: Reset database from empty for test suite | |
| run: supabase db reset | |
| - name: Run pgTAP database/RLS tests | |
| run: supabase test db | |
| - name: Export local stack connection details | |
| run: supabase status -o env | sed 's/"//g' >> "$GITHUB_ENV" | |
| - name: Run API-path integration test (Auth -> JWT -> PostgREST -> RLS -> Postgres) | |
| run: node supabase/scripts/api-integration-test.mjs | |
| env: | |
| SUPABASE_URL: ${{ env.API_URL }} | |
| SUPABASE_SECRET_KEY: ${{ env.SECRET_KEY }} | |
| SUPABASE_PUBLISHABLE_KEY: ${{ env.PUBLISHABLE_KEY }} | |
| - name: Stop local Supabase stack | |
| if: always() | |
| run: supabase stop |