ci(test): install the Electron binary before the unit tests

pnpm runs build scripts only for allow-listed packages, so electron's
postinstall never downloads its binary in CI. require('electron') then
fetches it lazily, and parallel Jest workers that spawn Electron
(epg-source-metadata, playlist.operations) race on that download: one
executes the half-written file and fails with ETXTBSY. Fetch the binary
once after pnpm install; install.js skips an existing binary.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
4grayandClaude Opus 5.5 committed 2026-09-28 23:31:08 +02:00
1 parent af44e2368b
commit eb67b3c277
1 file changed
+10
+10
View File
@@ -407,6 +407,16 @@ jobs:
- name: Install dependencies
run: pnpm install --frozen-lockfile
# pnpm only runs build scripts for allow-listed packages
# (pnpm-workspace.yaml), so electron's postinstall never fetches
# its binary. `require('electron')` then downloads it lazily, and
# parallel Jest workers that spawn Electron race on the same
# download: one executes the half-written binary (ETXTBSY).
# Fetch it once before any test runs; install.js skips an
# existing binary.
- name: Install the Electron binary
run: node node_modules/electron/install.js
- name: Validate agent guidance
run: pnpm run agents:validate