-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (50 loc) · 1.88 KB
/
Copy pathci.yml
File metadata and controls
61 lines (50 loc) · 1.88 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: CI
on:
push:
branches: [main]
pull_request:
# Cancel superseded runs on the same ref to save CI minutes.
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: Test (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
# Run every OS even if one fails — we want to see Windows/macOS results regardless.
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- name: Install dependencies
run: npm ci
# Fast feedback first: type-check, lint, and the vitest suite (unit + the
# FakeTestController mapping integration test). `npm test` is vitest only. These run on every
# OS because path handling and shell quoting are OS-sensitive.
- name: Type-check
run: npm run check-types
- name: Lint
run: npm run lint
- name: Unit tests (vitest)
run: npm test
# Headless VS Code (@vscode/test-electron) needs an X server + Electron runtime libs on
# Linux; Windows and macOS runners can launch it directly.
- name: Install headless VS Code runtime deps (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y xvfb libnss3 libatk-bridge2.0-0 libgtk-3-0 libgbm1
# libasound was renamed to libasound2t64 on Ubuntu 24.04; try both, don't fail the run.
sudo apt-get install -y libasound2t64 || sudo apt-get install -y libasound2 || true
- name: Integration tests (Linux, headless via xvfb)
if: runner.os == 'Linux'
run: xvfb-run -a npm run test:integration
- name: Integration tests (Windows / macOS)
if: runner.os != 'Linux'
run: npm run test:integration