Skip to content

Commit d1a910b

Browse files
authored
Merge pull request #4 from PMDevSolutions/ci/gui-electron-cache-poisoning
ci(gui): stop pnpm side-effects cache poisoning of Electron installs
2 parents e6ab29c + 18da62d commit d1a910b

2 files changed

Lines changed: 18 additions & 3 deletions

File tree

.github/workflows/gui-release.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,12 @@ jobs:
3838
cache: pnpm
3939

4040
- name: Install dependencies
41-
run: pnpm install --frozen-lockfile
41+
# side-effects-cache=false: the Linux runner shares the lockfile-keyed
42+
# pnpm store cache with gui.yml, whose lint/typecheck job installs with
43+
# ELECTRON_SKIP_BINARY_DOWNLOAD=1. Replaying that recorded postinstall
44+
# would yield an Electron install with no binary, breaking the smoke
45+
# test and packaging. Force postinstalls to really run.
46+
run: pnpm install --frozen-lockfile --config.side-effects-cache=false
4247

4348
- name: Install Electron runtime libraries + Xvfb (Linux)
4449
if: runner.os == 'Linux'

.github/workflows/gui.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,14 @@ jobs:
3838
- name: Install dependencies
3939
# Skip the ~100 MB Electron binary download — typecheck needs only the
4040
# bundled types and the core tests never launch Electron.
41+
# side-effects-cache=false: pnpm would otherwise record this *skipped*
42+
# Electron postinstall in the pnpm store (which setup-node caches, keyed
43+
# on the lockfile — shared with the smoke job), and any later install
44+
# restoring that cache would replay it and never get a binary
45+
# ("Electron failed to install correctly").
4146
env:
4247
ELECTRON_SKIP_BINARY_DOWNLOAD: '1'
43-
run: pnpm install --frozen-lockfile
48+
run: pnpm install --frozen-lockfile --config.side-effects-cache=false
4449

4550
- name: Lint
4651
run: pnpm --filter @vespasian/gui lint
@@ -68,7 +73,12 @@ jobs:
6873

6974
- name: Install dependencies
7075
# No ELECTRON_SKIP here — the smoke needs the real Electron binary.
71-
run: pnpm install --frozen-lockfile
76+
# side-effects-cache=false: don't replay postinstall results from the
77+
# restored store cache — an install that ran with
78+
# ELECTRON_SKIP_BINARY_DOWNLOAD=1 records a binary-less Electron build,
79+
# and replaying it here is what breaks electron.launch. This forces
80+
# Electron's postinstall to really run (and really download).
81+
run: pnpm install --frozen-lockfile --config.side-effects-cache=false
7282

7383
- name: Install Electron runtime libraries + Xvfb
7484
run: |

0 commit comments

Comments
 (0)