claude-desktop: route the chat-tab bridge through cmd /c npx on Windows #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: installer | ||
|
Check failure on line 1 in .github/workflows/installer.yml
|
||
| on: | ||
| push: | ||
| branches: [main, installer] | ||
| paths: | ||
| - 'installer/**' | ||
| - 'tests/bats/**' | ||
| - 'tests/pester/**' | ||
| - '.github/workflows/installer.yml' | ||
| pull_request: | ||
| paths: | ||
| - 'installer/**' | ||
| - 'tests/bats/**' | ||
| - 'tests/pester/**' | ||
| - '.github/workflows/installer.yml' | ||
| jobs: | ||
| shellcheck: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Run shellcheck | ||
| run: | | ||
| shellcheck -x --severity=warning \ | ||
| installer/agents.sh \ | ||
| installer/main.sh \ | ||
| installer/lib/*.sh \ | ||
| installer/hosts/*.sh | ||
| agents-ps1-encoding: | ||
| # agents.ps1 is the entry point invoked via `irm | iex`. iex doesn't strip | ||
| # a leading BOM, and Windows PowerShell 5.1 chokes on non-ASCII chars in | ||
| # source unless they're behind a BOM. The combination means agents.ps1 | ||
| # specifically must stay ASCII-only and BOM-free. | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Verify agents.ps1 encoding | ||
| run: | | ||
| python3 - <<'PY' | ||
| import sys | ||
| raw = open('installer/agents.ps1', 'rb').read() | ||
| if raw[:3] == b'\xef\xbb\xbf': | ||
| sys.exit('agents.ps1 starts with a UTF-8 BOM — irm | iex cannot parse this on Windows.') | ||
| try: | ||
| raw.decode('ascii') | ||
| except UnicodeDecodeError as e: | ||
| sys.exit(f'agents.ps1 contains non-ASCII bytes around offset {e.start}; replace with ASCII (— -> --, → -> ->, … -> ...).') | ||
| PY | ||
| bats: | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| os: [ubuntu-latest, macos-latest] | ||
| runs-on: ${{ matrix.os }} | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Install bats | ||
| run: | | ||
| if [[ "$RUNNER_OS" == "Linux" ]]; then | ||
| sudo apt-get update && sudo apt-get install -y bats | ||
| else | ||
| brew install bats-core | ||
| fi | ||
| - name: Run bats tests | ||
| env: | ||
| NO_COLOR: "1" | ||
| run: bats tests/bats/ | ||
| pester: | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| # `pwsh` exercises PowerShell 7+ on every OS (Linux/macOS/Windows). | ||
| # `powershell` exercises Windows PowerShell 5.1 — that's the default | ||
| # shell on a stock Windows box, and the one users get when they hit | ||
| # the Start menu and type "PowerShell". We need both to pass. | ||
| include: | ||
| - os: ubuntu-latest | ||
| shell: pwsh | ||
| - os: macos-latest | ||
| shell: pwsh | ||
| - os: windows-latest | ||
| shell: pwsh | ||
| - os: windows-latest | ||
| shell: powershell | ||
| runs-on: ${{ matrix.os }} | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Install Pester | ||
| shell: ${{ matrix.shell }} | ||
| run: | | ||
| Install-Module -Name Pester -Force -SkipPublisherCheck -Scope CurrentUser -AllowClobber | ||
| Get-Module -ListAvailable Pester | Select-Object -First 1 Name, Version | ||
| - name: Run Pester tests | ||
| shell: ${{ matrix.shell }} | ||
| env: | ||
| NO_COLOR: "1" | ||
| run: | | ||
| $result = Invoke-Pester -Path tests/pester/ -Output Detailed -PassThru | ||
| if ($result.FailedCount -gt 0) { exit 1 } | ||