diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 6226f3db..762907a8 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -28,14 +28,19 @@ jobs: - run: pnpm build test-unit: - name: Unit Test (Electron ${{ matrix.electron-version }}) - runs-on: ubuntu-24.04 + name: Unit Test (${{ matrix.name }}, Electron ${{ matrix.electron-version }}) + runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: # Minimum supported version: VS Code 1.106 (Oct 2025) -> Electron 37 -> Node 22 - # See https://github.com/ewanharris/vscode-versions for version mapping - electron-version: ["37", "latest"] + # See https://github.com/ewanharris/vscode-versions for version mapping. + # Older Electron stays Linux-only; "latest" smoke-tests Windows + macOS too. + include: + - { os: ubuntu-24.04, name: Linux, electron-version: "37" } + - { os: ubuntu-24.04, name: Linux, electron-version: "latest" } + - { os: windows-2025, name: Windows, electron-version: "latest" } + - { os: macos-15, name: macOS, electron-version: "latest" } steps: - uses: actions/checkout@v6 @@ -44,16 +49,21 @@ jobs: - name: Run tests with Electron ${{ matrix.electron-version }} run: ./scripts/test-electron.sh ${{ matrix.electron-version }} + shell: bash env: CI: true test-integration: - name: Integration Test (VS Code ${{ matrix.vscode-version }}) - runs-on: ubuntu-24.04 + name: Integration Test (${{ matrix.name }}, VS Code ${{ matrix.vscode-version }}) + runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: - vscode-version: ["1.106.0", "stable"] + include: + - { os: ubuntu-24.04, name: Linux, vscode-version: "1.106.0" } + - { os: ubuntu-24.04, name: Linux, vscode-version: "stable" } + - { os: windows-2025, name: Windows, vscode-version: "stable" } + - { os: macos-15, name: macOS, vscode-version: "stable" } steps: - uses: actions/checkout@v6 @@ -63,7 +73,9 @@ jobs: - run: pnpm build - name: Run integration tests on VS Code ${{ matrix.vscode-version }} - run: xvfb-run -a pnpm test:integration --label "VS Code ${{ matrix.vscode-version }}" + # xvfb only exists on Linux; on Windows/macOS the runner has a real display. + run: ${{ runner.os == 'Linux' && 'xvfb-run -a' || '' }} pnpm test:integration --label "VS Code ${{ matrix.vscode-version }}" + shell: bash package: name: Package