-
-
Notifications
You must be signed in to change notification settings - Fork 474
56 lines (52 loc) · 2.01 KB
/
Copy pathe2e.yml
File metadata and controls
56 lines (52 loc) · 2.01 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
name: E2E
on:
push:
branches: [master]
pull_request:
branches: [master]
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
e2e:
name: 'Playwright (Linux)'
runs-on: ubuntu-latest
# Bound the job so a stuck Electron launch/close fails fast instead of
# tying up a runner; this suite specifically guards shutdown hangs.
timeout-minutes: 15
env:
# Only Electron is launched here, never Playwright's bundled browsers, so
# skip their download during yarn install (faster, fewer network flakes).
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: '1'
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5
with:
# Match the Node that the target Electron bundles (Electron 42 -> Node
# 24); do not run ahead of it. Node 26 broke Electron's install tooling.
node-version: '24.x'
cache: 'yarn'
# Cache the @electron/get binary download so launch does not depend on a
# fresh GitHub-releases fetch every run.
- uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: ~/.cache/electron
key: ${{ runner.os }}-electron-${{ hashFiles('yarn.lock') }}
restore-keys: ${{ runner.os }}-electron-
- run: yarn install --frozen-lockfile
- run: yarn build
# Electron needs system libraries; xvfb provides a display on the headless
# runner. The app launches up to four windows, so a real display beats
# --headless here.
- run: npx playwright install-deps
- run: xvfb-run -a yarn test:e2e
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
if: ${{ !cancelled() }}
with:
name: playwright-report
path: |
playwright-report/
test-results/
retention-days: 14