Repository navigation
Make local Supabase verification parallel-safe with two slots #375
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: Database | |
| # Pull requests that change the schema, its tests, or the gate run pgTAP and | |
| # the database scripts against Postgres alone, about 2 minutes. The full gate | |
| # (local Supabase, pgTAP, and the full-stack browser journeys on desktop and | |
| # mobile, about 20 minutes) runs nightly and on demand. | |
| on: | |
| pull_request: | |
| paths: | |
| - "supabase/migrations/**" | |
| - "supabase/tests/**" | |
| - "supabase/seed.sql" | |
| - "supabase/config.toml" | |
| - "scripts/test-*.sh" | |
| - ".superset/db-gate.sh" | |
| - ".superset/lib/**" | |
| - ".github/workflows/database.yml" | |
| schedule: | |
| - cron: "23 5 * * *" | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| # ghcr.io rate-limits shared runners; the same images are on ECR. | |
| SUPABASE_INTERNAL_IMAGE_REGISTRY: public.ecr.aws | |
| jobs: | |
| pgtap: | |
| if: github.event_name == 'pull_request' | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| # The gate runs the repo-pinned Supabase CLI from node_modules. | |
| - uses: ./.github/actions/node-deps | |
| - name: pgTAP and database scripts | |
| run: ./.superset/db-gate.sh --db-only | |
| full-gate: | |
| if: github.event_name != 'pull_request' | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 45 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - uses: ./.github/actions/node-deps | |
| - name: Cache Playwright browsers | |
| uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 | |
| with: | |
| path: ~/.cache/ms-playwright | |
| key: playwright-${{ runner.os }}-${{ hashFiles('package-lock.json') }} | |
| - name: Install Chromium | |
| run: npx playwright install --with-deps chromium | |
| - name: Database and real workspace journey | |
| env: | |
| WORKSPACE_GATE_ARTIFACT_ROOT: ${{ runner.temp }}/workspace-gate | |
| run: ./.superset/db-gate.sh | |
| - name: Upload workspace failure artifacts | |
| if: failure() | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: workspace-gate-failure-${{ github.run_id }} | |
| path: | | |
| ${{ runner.temp }}/workspace-gate/ | |
| test-results/ | |
| playwright-report/ | |
| if-no-files-found: ignore | |
| retention-days: 7 |