fix(ci): disable Windows tests due to Deno shell spawn regression #24
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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| build-check: | |
| name: Build Check (${{ matrix.os }}) | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] # windows-latest disabled due to Deno shell spawn issue | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Deno | |
| uses: denoland/setup-deno@v2 | |
| with: | |
| deno-version: v2.7.13 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| - name: Verify Node.js | |
| shell: bash | |
| run: node --version | |
| - name: Setup Node.js PATH (Windows) | |
| if: runner.os == 'Windows' | |
| shell: pwsh | |
| id: node_path | |
| run: | | |
| $nodeDir = (Get-Command node).Source | Split-Path -Parent | |
| $drive = $nodeDir.Substring(0, 1).ToLower() | |
| $path = $nodeDir.Substring(2).Replace('\', '/') | |
| $nodeDirBash = "/$drive$path" | |
| echo "node_dir=$nodeDir" >> $env:GITHUB_OUTPUT | |
| echo "node_dir_bash=$nodeDirBash" >> $env:GITHUB_OUTPUT | |
| echo "Windows path: $nodeDir" | |
| echo "Bash path: $nodeDirBash" | |
| echo "COMSPEC=$env:COMSPEC" >> $env:GITHUB_OUTPUT | |
| - name: Format check | |
| shell: bash | |
| run: deno fmt --check src/ | |
| - name: Lint | |
| run: deno lint src/ | |
| - name: Type check | |
| run: deno check src/index.ts | |
| - name: Test (Unix) | |
| if: runner.os != 'Windows' | |
| shell: bash | |
| run: | | |
| echo "PATH: $PATH" | |
| which node || echo "node not in PATH" | |
| deno test --allow-read --allow-env --allow-run | |
| - name: Test (Windows) | |
| if: runner.os == 'Windows' | |
| shell: pwsh | |
| run: | | |
| $env:PATH = "${{ steps.node_path.outputs.node_dir }};$env:PATH" | |
| echo "PATH: $env:PATH" | |
| Get-Command node -ErrorAction SilentlyContinue | ForEach-Object { $_.Source } | Write-Host | |
| deno test --allow-read --allow-env --allow-run |