test: add e2e tests #1
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: E2E | |
| on: | |
| pull_request: | |
| workflow_dispatch: | |
| # Cancel superseded runs on the same PR/branch so updates don't queue up. | |
| concurrency: | |
| group: e2e-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| e2e: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 1 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| - name: Cache bun install cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.bun/install/cache | |
| key: bun-${{ runner.os }}-${{ hashFiles('bun.lock') }} | |
| restore-keys: bun-${{ runner.os }}- | |
| - name: Install dependencies | |
| run: bun install --frozen-lockfile | |
| - name: Typecheck E2E sources | |
| run: bun run typecheck:e2e | |
| - name: Install Playwright (Chromium + OS deps) | |
| run: bunx playwright install --with-deps chromium | |
| - name: Setup Supabase CLI | |
| uses: supabase/setup-cli@v1 | |
| with: | |
| version: latest | |
| # Brings up the real Supabase stack (Auth, Postgres, Inbucket) that the E2E suite requires. | |
| # Minio (real S3) and the Next dev server are started by the test script itself. | |
| - name: Start Supabase | |
| run: supabase start | |
| - name: Run E2E tests | |
| run: bun run test:e2e | |
| - name: Upload Playwright report | |
| if: ${{ !cancelled() }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: playwright-report | |
| path: playwright-report/ | |
| retention-days: 7 |