-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (51 loc) · 1.44 KB
/
Copy pathe2e.yml
File metadata and controls
63 lines (51 loc) · 1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: E2E
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
concurrency:
group: e2e-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
playwright:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: '20'
cache: 'npm'
- name: Install
run: npm ci --no-audit --no-fund
- name: Cache Playwright browsers
id: cache-pw
uses: actions/cache@v5
with:
path: ~/.cache/ms-playwright
key: ${{ runner.os }}-playwright-${{ hashFiles('package-lock.json') }}
restore-keys: ${{ runner.os }}-playwright-
- name: Install Playwright browsers
if: steps.cache-pw.outputs.cache-hit != 'true'
run: npx playwright install --with-deps chromium
- name: Install Playwright deps
if: steps.cache-pw.outputs.cache-hit == 'true'
run: npx playwright install-deps chromium
- name: Build
run: npm run build
env:
NEXT_PUBLIC_SITE_URL: https://example.com
- name: Run E2E
run: npm run test:e2e
env:
CI: 'true'
- name: Upload Playwright report
if: failure()
uses: actions/upload-artifact@v7
with:
name: playwright-report
path: playwright-report
retention-days: 14