|
8 | 8 |
|
9 | 9 | jobs: |
10 | 10 | e2e: |
11 | | - if: | |
12 | | - contains(github.event.head_commit.message, 'E2E') |
13 | | - || contains(github.event.pull_request.title, 'E2E') |
14 | | - || contains(github.event.pull_request.body, 'E2E') |
15 | 11 | runs-on: ubuntu-latest |
16 | 12 | concurrency: |
17 | 13 | group: ${{ github.workflow }}-${{ github.ref }} |
18 | 14 | cancel-in-progress: true |
19 | 15 |
|
20 | 16 | steps: |
21 | | - - name: 📥 Checkout repository |
22 | | - uses: actions/checkout@v4 |
23 | | - |
24 | | - - name: ⚙️ Setup Node.js |
25 | | - uses: actions/setup-node@v4 |
26 | | - with: |
27 | | - node-version: 20 |
28 | | - cache: npm |
29 | | - |
30 | | - - name: 📦 Install dependencies |
31 | | - run: npm ci |
32 | | - |
33 | | - # ▸ tiny helper script prints which Rollup version we’re about to pin |
34 | | - - name: 🔍 Show Rollup version |
35 | | - run: | |
| 17 | + - uses: actions/checkout@v4 |
| 18 | + - uses: actions/setup-node@v4 |
| 19 | + with: { node-version: 20, cache: npm } |
| 20 | + - run: npm ci |
| 21 | + - run: | |
36 | 22 | node - <<'NODE' |
37 | 23 | const v = require('./package.json').devDependencies.rollup ?? 'latest'; |
38 | | - console.log('ℹ️ Installing native Rollup helper for', v); |
| 24 | + console.log('ℹ Installing native Rollup helper for', v); |
39 | 25 | NODE |
| 26 | + - run: npm install --no-save @rollup/rollup-linux-x64-gnu@$(node -p "require('./package.json').devDependencies.rollup || '4'") |
40 | 27 |
|
41 | | - - name: 🔧 Install Rollup native helper |
42 | | - run: | |
43 | | - npm install --no-save \ |
44 | | - @rollup/rollup-linux-x64-gnu@$(node -p "require('./package.json').devDependencies.rollup || '4'") |
| 28 | + - uses: supabase/setup-cli@v1 |
| 29 | + with: { version: 2.24.3 } |
45 | 30 |
|
46 | | - - name: 🛠️ Setup Supabase CLI |
47 | | - uses: supabase/setup-cli@v1 |
48 | | - with: |
49 | | - version: 2.24.3 |
50 | | - |
51 | | - - name: 🚀 Start local Supabase |
| 31 | + - name: Start Supabase |
52 | 32 | env: { SUPABASE_TELEMETRY_DISABLED: "1" } |
53 | 33 | run: supabase start & |
54 | 34 |
|
55 | | - - name: ⏳ Wait for Supabase (≤180 s) |
56 | | - run: npx --yes wait-on \ |
57 | | - tcp:127.0.0.1:54321 tcp:127.0.0.1:54322 --timeout 280000 |
58 | | - |
59 | | - - name: 🔑 Export Supabase env vars |
60 | | - run: | |
61 | | - echo "SUPABASE_URL=http://127.0.0.1:54321" >> "$GITHUB_ENV" |
62 | | - echo "SUPABASE_ANON_KEY=$(supabase status -o env | grep SUPABASE_ANON_KEY | cut -d= -f2)" >> "$GITHUB_ENV" |
| 35 | + - name: Wait for Supabase (≤180 s) |
| 36 | + run: npx --yes wait-on tcp:127.0.0.1:54321 tcp:127.0.0.1:54322 --timeout 180000 |
63 | 37 |
|
64 | | - - name: 🛜 Install Playwright browsers + deps |
65 | | - run: npx playwright install --with-deps |
| 38 | + - run: echo "SUPABASE_URL=http://127.0.0.1:54321" >> $GITHUB_ENV |
| 39 | + - run: | |
| 40 | + echo "SUPABASE_ANON_KEY=$(supabase status -o env | grep SUPABASE_ANON_KEY | cut -d= -f2)" >> $GITHUB_ENV |
66 | 41 |
|
67 | | - - name: 🧪 Run Playwright E2E (local) |
68 | | - run: npm run e2e:local |
| 42 | + - run: npx playwright install --with-deps |
| 43 | + - run: npm run e2e:local |
69 | 44 | env: { CI: "true" } |
70 | 45 |
|
71 | | - - name: 📤 Upload Playwright report |
| 46 | + - uses: actions/upload-artifact@v4 |
72 | 47 | if: always() |
73 | | - uses: actions/upload-artifact@v4 |
74 | | - with: |
75 | | - name: playwright-report |
76 | | - path: playwright-report |
77 | | - |
| 48 | + with: { name: playwright-report, path: playwright-report } |
0 commit comments