-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (58 loc) · 1.73 KB
/
Copy pathe2e.yml
File metadata and controls
60 lines (58 loc) · 1.73 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
name: E2E
on:
push:
branches: [main]
paths:
- 'src/**'
- 'e2e/**'
- 'index.html'
- 'package.json'
- 'package-lock.json'
- 'playwright.config.ts'
- 'vite.config.ts'
- '.github/workflows/e2e.yml'
pull_request:
paths:
- 'src/**'
- 'e2e/**'
- 'index.html'
- 'package.json'
- 'package-lock.json'
- 'playwright.config.ts'
- 'vite.config.ts'
- '.github/workflows/e2e.yml'
jobs:
e2e:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version-file: '.nvmrc'
cache: npm
- name: Install dependencies
run: npm ci
- name: Resolve Playwright version
id: pw
run: echo "version=$(node -p "require('@playwright/test/package.json').version")" >> "$GITHUB_OUTPUT"
- name: Cache Playwright browsers
id: pw-cache
uses: actions/cache@v6
with:
path: ~/.cache/ms-playwright
key: playwright-${{ runner.os }}-${{ steps.pw.outputs.version }}
- name: Install Playwright browser + OS deps (cache miss)
if: steps.pw-cache.outputs.cache-hit != 'true'
run: npx playwright install --with-deps chromium
- name: Install Playwright OS deps only (cache hit)
if: steps.pw-cache.outputs.cache-hit == 'true'
run: npx playwright install-deps chromium
- name: Run E2E tests (smoke, share deep-link, structural a11y, keyboard)
run: npm run test:e2e
- name: Upload report on failure
if: failure()
uses: actions/upload-artifact@v7
with:
name: playwright-report
path: playwright-report/
retention-days: 7