test: scope WSL device login assertion to Linux #7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CCM cross-platform verification | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| unix: | |
| name: ${{ matrix.name }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - name: Linux contract | |
| os: ubuntu-latest | |
| expected_arch: x86_64 | |
| - name: macOS Intel contract | |
| os: macos-13 | |
| expected_arch: x86_64 | |
| - name: macOS Apple Silicon contract | |
| os: macos-14 | |
| expected_arch: arm64 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| - name: Verify runner architecture | |
| run: test "$(uname -m)" = "${{ matrix.expected_arch }}" | |
| - name: Run core tests | |
| run: npm test | |
| - name: Run Unix installer, official-login shim, and third-party-switch contracts | |
| run: npm run test:unix | |
| windows: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| - name: Run Windows unit and channel-switch tests | |
| shell: pwsh | |
| run: npm.cmd test | |
| wsl2: | |
| # Requires a self-hosted Windows runner with a WSL2 distribution and Node.js | |
| # installed inside that distribution. This job exercises the actual WSL2 kernel. | |
| if: github.event_name == 'workflow_dispatch' | |
| runs-on: [self-hosted, windows, wsl2] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Run actual WSL2 installer and switching smoke test | |
| shell: pwsh | |
| run: .\tests\wsl2-smoke.ps1 -SourceRoot $env:GITHUB_WORKSPACE |