Skip to content

Commit 8f5f5cd

Browse files
nicoladclaude
andcommitted
Add GitHub Actions workflow for Playwright e2e tests
Runs on push/PR to main, installs Playwright chromium, runs tests with CI=true (no server reuse), and uploads playwright-report as artifact. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 54e49d3 commit 8f5f5cd

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

.github/workflows/playwright.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Playwright Tests
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
timeout-minutes: 15
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- uses: pnpm/action-setup@v4
18+
with:
19+
version: 10.10.0
20+
21+
- uses: actions/setup-node@v4
22+
with:
23+
node-version: "22"
24+
cache: "pnpm"
25+
26+
- name: Install dependencies
27+
run: pnpm install --frozen-lockfile
28+
29+
- name: Install Playwright browsers
30+
run: pnpm exec playwright install chromium --with-deps
31+
32+
- name: Run Playwright tests
33+
run: pnpm exec playwright test
34+
env:
35+
CI: true
36+
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY: ${{ secrets.NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY }}
37+
CLERK_SECRET_KEY: ${{ secrets.CLERK_SECRET_KEY }}
38+
CLOUDFLARE_D1_URL: ${{ secrets.CLOUDFLARE_D1_URL }}
39+
CLOUDFLARE_API_KEY: ${{ secrets.CLOUDFLARE_API_KEY }}
40+
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
41+
CLOUDFLARE_DATABASE_ID: ${{ secrets.CLOUDFLARE_DATABASE_ID }}
42+
43+
- uses: actions/upload-artifact@v4
44+
if: ${{ !cancelled() }}
45+
with:
46+
name: playwright-report
47+
path: playwright-report/
48+
retention-days: 30

0 commit comments

Comments
 (0)