Skip to content

CI: 3-minute pull-request check, slow suites on schedules #368

CI: 3-minute pull-request check, slow suites on schedules

CI: 3-minute pull-request check, slow suites on schedules #368

Workflow file for this run

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