Skip to content

Part 6 pw

Part 6 pw #10

Workflow file for this run

name: E2E Tests with Local Supabase
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main ]
jobs:
e2e:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
steps:
# 1. Checkout + Node
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- run: npm ci
# 2. Supabase CLI v2
- uses: supabase/setup-cli@v1
with:
version: 2.24.3 # pick any existing 2.x tag
# 3. Start the local stack (no obsolete flags)
- name: Start Supabase
env:
SUPABASE_TELEMETRY_DISABLED: "1" # opt-out, replaces --no-analytics
run: supabase start & # detach; health-checks stay on
# 4. Wait max 60 s for ports 54321/54322
- name: Wait for Supabase
run: npx --yes wait-on tcp:54321 tcp:54322 --timeout 60000
# 5. Export env keys for Angular → Playwright
- run: |
echo "SUPABASE_URL=http://localhost:54321" >> $GITHUB_ENV
echo "SUPABASE_ANON_KEY=$(supabase status -o env | grep SUPABASE_ANON_KEY | cut -d= -f2)" >> $GITHUB_ENV
shell: bash
# 6. Playwright browsers + tests
- run: npx playwright install --with-deps
- run: npm run e2e:local
env:
CI: "true"
# 7. Always save HTML report
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: playwright-report