Part 6 pw #11
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 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 | |
| # 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 |