Skip to content

test: run the e2e suite in CI and harden window selection #4

test: run the e2e suite in CI and harden window selection

test: run the e2e suite in CI and harden window selection #4

Workflow file for this run

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
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5
with:
# Node 24 (active LTS), not 26 (Current): keep the e2e runner on the
# stable line for Electron's install tooling and Playwright.
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
# Materialize Electron's platform binary into node_modules/electron/dist;
# its postinstall can be skipped on a cache-restored tree, which fails
# launch with "Electron failed to install correctly".
- run: node node_modules/electron/install.js
- 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