Skip to content

Commit 18777ce

Browse files
committed
ci: cache Electron binary and retry pnpm install on failure
1 parent 82bf5eb commit 18777ce

1 file changed

Lines changed: 18 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,25 @@ jobs:
9393
node-version: "24"
9494
cache: pnpm
9595

96+
- name: Cache Electron binary
97+
uses: actions/cache@v5
98+
with:
99+
path: ~/.cache/electron
100+
key: electron-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }}
101+
restore-keys: |
102+
electron-${{ runner.os }}-
103+
96104
- name: Install dependencies
97-
run: pnpm install --frozen-lockfile
105+
run: |
106+
for attempt in 1 2 3; do
107+
if pnpm install --frozen-lockfile; then
108+
exit 0
109+
fi
110+
echo "::warning::pnpm install failed on attempt $attempt; retrying in 15s"
111+
sleep 15
112+
done
113+
echo "::error::pnpm install failed after 3 attempts"
114+
exit 1
98115
99116
- name: Test
100117
run: pnpm run test

0 commit comments

Comments
 (0)