Skip to content

Part 6 pw

Part 6 pw #18

Workflow file for this run

name: E2E Tests with Local Supabase
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main ]
jobs:
e2e:
if: |
contains(github.event.head_commit.message, 'E2E')
|| contains(github.event.pull_request.title, 'E2E')
|| contains(github.event.pull_request.body, 'E2E')
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
steps:
- name: 📥 Checkout repository
uses: actions/checkout@v4
- name: ⚙️ Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- name: 📦 Install dependencies
run: npm ci
# ▸ tiny helper script prints which Rollup version we’re about to pin
- name: 🔍 Show Rollup version
run: |
node - <<'NODE'
const v = require('./package.json').devDependencies.rollup ?? 'latest';
console.log('ℹ️ Installing native Rollup helper for', v);
NODE
- name: 🔧 Install Rollup native helper
run: |
npm install --no-save \
@rollup/rollup-linux-x64-gnu@$(node -p "require('./package.json').devDependencies.rollup || '4'")
- name: 🛠️ Setup Supabase CLI
uses: supabase/setup-cli@v1
with:
version: 2.24.3
- name: 🚀 Start local Supabase
env: { SUPABASE_TELEMETRY_DISABLED: "1" }
run: supabase start &
- name: ⏳ Wait for Supabase (≤180 s)
run: npx --yes wait-on \
tcp:127.0.0.1:54321 tcp:127.0.0.1:54322 --timeout 180000
- name: 🔑 Export Supabase env vars
run: |
echo "SUPABASE_URL=http://127.0.0.1:54321" >> "$GITHUB_ENV"
echo "SUPABASE_ANON_KEY=$(supabase status -o env | grep SUPABASE_ANON_KEY | cut -d= -f2)" >> "$GITHUB_ENV"
- name: 🛜 Install Playwright browsers + deps
run: npx playwright install --with-deps
- name: 🧪 Run Playwright E2E (local)
run: npm run e2e:local
env: { CI: "true" }
- name: 📤 Upload Playwright report
if: always()
uses: actions/upload-artifact@v4
with:
name: playwright-report
path: playwright-report