File tree Expand file tree Collapse file tree 3 files changed +72
-155
lines changed
Expand file tree Collapse file tree 3 files changed +72
-155
lines changed Original file line number Diff line number Diff line change 11name : 🎭 E2E Test Setup
22description : ' Setup Playwright and install browsers for E2E testing'
33
4- inputs :
5- browsers :
6- description : ' Browsers to install (chromium, firefox, webkit, or all)'
7- required : false
8- default : ' chromium'
9-
104runs :
115 using : ' composite'
126 steps :
13- - name : 🎭 Install Playwright Browsers
14- run : pnpm exec playwright install --with-deps ${{ inputs.browsers }}
7+ - name : 💾 Cache Playwright browsers
8+ uses : actions/cache@v4
9+ with :
10+ path : ~/.cache/ms-playwright
11+ key : ${{ runner.os }}-playwright-${{ hashFiles('**/pnpm-lock.yaml') }}
12+ restore-keys : |
13+ ${{ runner.os }}-playwright-
14+
15+ - name : 🎭 Install Playwright browsers
16+ run : pnpm e2e:install
1517 shell : bash
1618
17- - name : 📋 Verify Playwright Installation
19+ - name : 📋 Verify Playwright installation
1820 run : pnpm exec playwright --version
1921 shell : bash
Original file line number Diff line number Diff line change 1+ name : 🎭 Playwright E2E
2+
3+ on :
4+ pull_request :
5+ types : [opened, synchronize, reopened]
6+ workflow_dispatch :
7+
8+ concurrency :
9+ group : playwright-e2e-${{ github.ref }}
10+ cancel-in-progress : true
11+
12+ permissions :
13+ contents : read
14+
15+ env :
16+ NODE_ENV : test
17+ CI : true
18+ E2E_BASE_URL : http://localhost:3000
19+
20+ jobs :
21+ e2e :
22+ runs-on : ubuntu-24.04
23+ container : mcr.microsoft.com/playwright:v1.50.0-noble
24+ timeout-minutes : 60
25+ steps :
26+ - name : 📥 Checkout
27+ uses : actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
28+
29+ - name : 💨 Cache turbo
30+ uses : actions/cache@v4
31+ with :
32+ path : |
33+ .turbo
34+ key : ${{ runner.os }}-turbo-${{ hashFiles('pnpm-lock.yaml', 'turbo.json') }}
35+ restore-keys : |
36+ ${{ runner.os }}-turbo-
37+
38+ - name : 💻 Node setup
39+ uses : ./.github/actions/node-setup
40+
41+ - name : 🎭 E2E setup
42+ uses : ./.github/actions/e2e-setup
43+
44+ - name : 🏗️ Build apps
45+ run : pnpm build
46+ shell : bash
47+
48+ - name : 🧪 Run E2E (HTML report)
49+ run : pnpm e2e
50+ shell : bash
51+
52+ - name : 📤 Upload Playwright artifacts
53+ if : always()
54+ uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
55+ with :
56+ name : playwright-artifacts
57+ path : |
58+ apps/frontend-e2e/playwright-report/
59+ apps/frontend-e2e/test-results/
60+ apps/frontend-e2e/reports/
61+ if-no-files-found : ignore
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments