-
Notifications
You must be signed in to change notification settings - Fork 0
81 lines (65 loc) · 2.16 KB
/
Copy pathe2e-playwright.yml
File metadata and controls
81 lines (65 loc) · 2.16 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# E2E Playwright workflow — runs on PRs and manual dispatch.
# Fast e2e (tagged "fast") runs on all OSes; full suite is Linux-only to
# contain runner minutes — macOS/Windows Playwright is ~3-4× slower.
name: E2E (Playwright)
on:
pull_request:
workflow_dispatch:
jobs:
e2e-fast:
name: "e2e:fast — ${{ matrix.os }}"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
# Fast subset on all three platforms — chromium only.
os: [ubuntu-latest, macos-latest, windows-latest]
browser: [chromium]
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v5
with:
node-version: "22.x"
cache: npm
- name: Install dependencies
run: npm ci
# Cache Playwright browser binaries keyed on Playwright version +
# browser list; avoids re-downloading ~100 MB per run.
- name: Cache Playwright browsers
uses: actions/cache@v5
id: pw-cache
with:
path: |
~/.cache/ms-playwright
~/Library/Caches/ms-playwright
%LOCALAPPDATA%\ms-playwright
key: pw-${{ matrix.os }}-${{ hashFiles('package-lock.json') }}
- name: Install Playwright chromium
if: steps.pw-cache.outputs.cache-hit != 'true'
run: npm run browser:install
- name: Run fast e2e
run: npm run test:e2e:fast
e2e-full:
name: "e2e:full — ubuntu"
runs-on: ubuntu-latest
# Only run full suite on Linux; macOS/Windows covered by e2e-fast lane.
needs: e2e-fast
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v5
with:
node-version: "22.x"
cache: npm
- name: Install dependencies
run: npm ci
- name: Cache Playwright browsers
uses: actions/cache@v5
id: pw-cache
with:
path: ~/.cache/ms-playwright
key: pw-ubuntu-latest-${{ hashFiles('package-lock.json') }}
- name: Install Playwright chromium
if: steps.pw-cache.outputs.cache-hit != 'true'
run: npm run browser:install
- name: Run full e2e suite
run: npm run test:e2e