Skip to content

Commit 3f7e1aa

Browse files
committed
ci: ensure electron binary is installed
1 parent d65f359 commit 3f7e1aa

1 file changed

Lines changed: 19 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,25 @@ jobs:
3232
cache: pnpm
3333

3434
- name: Install
35-
run: pnpm install --frozen-lockfile
35+
run: env -u ELECTRON_SKIP_BINARY_DOWNLOAD -u ELECTRON_SKIP_DOWNLOAD pnpm install --frozen-lockfile --ignore-scripts=false
36+
37+
- name: Install Electron binary
38+
run: |
39+
env -u ELECTRON_SKIP_BINARY_DOWNLOAD -u ELECTRON_SKIP_DOWNLOAD pnpm -C apps/desktop exec node -e "
40+
const { execFileSync } = require('node:child_process');
41+
const path = require('node:path');
42+
const electronDir = path.dirname(require.resolve('electron/package.json'));
43+
execFileSync(process.execPath, [path.join(electronDir, 'install.js')], { stdio: 'inherit' });
44+
"
45+
46+
- name: Verify Electron binary
47+
run: |
48+
env -u ELECTRON_SKIP_BINARY_DOWNLOAD -u ELECTRON_SKIP_DOWNLOAD pnpm -C apps/desktop exec node -e "
49+
const fs = require('node:fs');
50+
const electronPath = require('electron');
51+
fs.accessSync(electronPath, fs.constants.X_OK);
52+
console.log(electronPath);
53+
"
3654
3755
- name: Lint
3856
run: pnpm lint

0 commit comments

Comments
 (0)