@@ -15,8 +15,12 @@ concurrency:
1515
1616jobs :
1717 e2e :
18- name : ' Playwright (Linux)'
19- runs-on : ubuntu-latest
18+ name : ' Playwright (${{ matrix.os }})'
19+ strategy :
20+ fail-fast : false
21+ matrix :
22+ os : [ubuntu-latest, macos-latest]
23+ runs-on : ${{ matrix.os }}
2024 # Bound the job so a stuck Electron launch/close fails fast instead of
2125 # tying up a runner; this suite specifically guards shutdown hangs.
2226 timeout-minutes : 15
3741 # binary on this runner even though the downloaded zip is complete and
3842 # valid, so launch fails with "Electron failed to install correctly". Let
3943 # install.js fetch the zip into the cache, then extract it with the system
40- # `unzip` and point path.txt at the binary.
44+ # `unzip` and point path.txt at the binary. Linux-only: the zip is the
45+ # linux-x64 build and the binary lives at dist/electron. On macOS the
46+ # postinstall extracts dist/Electron.app correctly and needs no workaround.
4147 - name : Install the Electron binary
48+ if : matrix.os == 'ubuntu-latest'
4249 run : |
4350 set -euo pipefail
4451 node node_modules/electron/install.js || true
5158 - run : yarn build
5259 # Electron needs system libraries; xvfb provides a display on the headless
5360 # runner. The app launches up to four windows, so a real display beats
54- # --headless here.
55- - run : npx playwright install-deps
61+ # --headless here. Both are Linux-only: macOS runners have a display and do
62+ # not use this apt-based dependency installer.
63+ - if : matrix.os == 'ubuntu-latest'
64+ run : npx playwright install-deps
5665 # A minimal Python env with jupyterlab so the env-backed tests run (a venv
5766 # + pip is lighter than a full conda env for a smoke). The seeded
5867 # app-data.json points the app at this interpreter.
@@ -67,11 +76,19 @@ jobs:
6776 python3 -m venv "$RUNNER_TEMP/jlab-venv"
6877 "$RUNNER_TEMP/jlab-venv/bin/pip" install --quiet "jupyterlab==$ver"
6978 echo "JLAB_TEST_PYTHON_PATH=$RUNNER_TEMP/jlab-venv/bin/python" >> "$GITHUB_ENV"
70- - run : xvfb-run -a yarn test:e2e
79+ # xvfb is Linux-only; on macOS the runner has a real display, so run the
80+ # suite directly. Same yarn test:e2e command on both legs.
81+ - name : Run the e2e suite
82+ run : |
83+ if [ "$RUNNER_OS" = "Linux" ]; then
84+ xvfb-run -a yarn test:e2e
85+ else
86+ yarn test:e2e
87+ fi
7188 - uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
7289 if : ${{ !cancelled() }}
7390 with :
74- name : playwright-report
91+ name : playwright-report-${{ matrix.os }}
7592 path : |
7693 playwright-report/
7794 test-results/
0 commit comments