Skip to content

chore(ci): pin supabase cli version explicitly #605

chore(ci): pin supabase cli version explicitly

chore(ci): pin supabase cli version explicitly #605

Workflow file for this run

name: E2E Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
env:
VITE_SUPABASE_URL: http://127.0.0.1:54321
strategy:
fail-fast: false
matrix:
shardIndex: [1, 2, 3, 4]
shardTotal: [4]
# Add shardIndex: [1, 2, 3, 4, 5, 6, 7, 8] and shardTotal: [8] for more shards
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: "pnpm"
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Setup Supabase
run: |
npx supabase start
sleep 10
npx supabase db reset
- name: Export Supabase local publishable key
run: |
npx supabase status -o env > /tmp/supabase-status.env
cat /tmp/supabase-status.env
KEY_LINE=$(grep -iE "PUBLISHABLE_KEY" /tmp/supabase-status.env | head -1)
if [ -z "$KEY_LINE" ]; then
KEY_LINE=$(grep -iE "ANON_KEY" /tmp/supabase-status.env | head -1)
fi
if [ -z "$KEY_LINE" ]; then
echo "Could not find a publishable/anon key in 'supabase status -o env' output" >&2
exit 1
fi
KEY_VALUE=$(echo "$KEY_LINE" | cut -d'=' -f2- | tr -d '"')
echo "VITE_SUPABASE_PUBLISHABLE_KEY=$KEY_VALUE" >> "$GITHUB_ENV"
echo "TEST_SUPABASE_ANON_KEY=$KEY_VALUE" >> "$GITHUB_ENV"
- name: Build project
run: pnpm run build
- name: Run Playwright tests
run: npx playwright test --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }} --reporter=blob
env:
TEST_SUPABASE_URL: http://localhost:54321
- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: blob-report-${{ matrix.shardIndex }}
path: blob-report
retention-days: 1
report:
needs: test
runs-on: ubuntu-latest
if: always()
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: "pnpm"
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Download blob reports from GitHub Actions Artifacts
uses: actions/download-artifact@v4
with:
path: all-blob-reports
pattern: blob-report-*
merge-multiple: true
- name: Merge JSON reports
run: npx playwright merge-reports --reporter json ./all-blob-reports > ./all-json-reports.json
- name: Generate summary comment
uses: daun/playwright-report-summary@v3
if: always()
with:
report-file: all-json-reports.json
- name: Merge into HTML Report
run: npx playwright merge-reports --reporter html ./all-blob-reports
- uses: actions/upload-artifact@v4
with:
name: playwright-report
path: playwright-report/
retention-days: 30