-
Notifications
You must be signed in to change notification settings - Fork 1
39 lines (37 loc) · 1.28 KB
/
Copy pathci.yml
File metadata and controls
39 lines (37 loc) · 1.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: CI
on:
push:
branches: [main]
pull_request:
jobs:
verify:
name: verify (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
# Platform-specific failures are the whole point of this matrix, so one
# runner going red must not cancel the others - we want all three reports.
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- run: npm ci --legacy-peer-deps
# Several suites transitively import `electron`, and its index.js downloads
# the binary on first require. Parallel vitest workers racing that download
# corrupt the extract on macOS (EEXIST on the Electron Framework symlink),
# so do it once, serially, up front. Idempotent - exits early if present.
- name: Install Electron binary
shell: bash
run: |
for attempt in 1 2 3; do
npm run install-electron && exit 0
if [ "$attempt" -eq 3 ]; then exit 1; fi
echo "Electron download failed (attempt $attempt/3); retrying in 10 seconds..."
sleep 10
done
- run: npm run typecheck
- run: npm test