fix(install.ps1): add ~/.local/bin to PATH after Claude Code native i… #13
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: | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| powershell: | |
| name: PowerShell (parse + PSScriptAnalyzer) | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Syntax parse (.ps1) | |
| shell: pwsh | |
| run: | | |
| $bad = 0 | |
| Get-ChildItem -Filter *.ps1 | ForEach-Object { | |
| $errs = $null | |
| [void][System.Management.Automation.Language.Parser]::ParseFile($_.FullName, [ref]$null, [ref]$errs) | |
| if ($errs) { Write-Host "::error file=$($_.Name)::$($errs[0].Message)"; $bad++ } | |
| else { Write-Host "OK $($_.Name)" } | |
| } | |
| exit $bad | |
| - name: PSScriptAnalyzer (errors only) | |
| shell: pwsh | |
| run: | | |
| Set-PSRepository PSGallery -InstallationPolicy Trusted | |
| Install-Module PSScriptAnalyzer -Force -Scope CurrentUser | |
| $r = Invoke-ScriptAnalyzer -Path . -Recurse -Severity Error | |
| if ($r) { | |
| $r | Format-Table -AutoSize | Out-String | Write-Host | |
| Write-Host "::error::PSScriptAnalyzer found $($r.Count) error(s)" | |
| exit 1 | |
| } | |
| Write-Host "PSScriptAnalyzer: no errors" | |
| - name: install.ps1 dry-run (non-interactive smoke test) | |
| shell: pwsh | |
| env: | |
| DEVSETUP_DRYRUN: "1" | |
| run: | | |
| # Runs the installer end-to-end with no prompts and no real installs. | |
| # Child process so the script's `exit 0` doesn't end this step early. | |
| $out = pwsh -NoProfile -File ./install.ps1 *>&1 | Out-String | |
| $code = $LASTEXITCODE | |
| Write-Host $out | |
| if ($code -ne 0) { Write-Host "::error::install.ps1 dry-run exited $code"; exit 1 } | |
| if ($out -notmatch 'DRY-RUN') { Write-Host "::error::install.ps1 dry-run did not produce a plan"; exit 1 } | |
| Write-Host "install.ps1 dry-run smoke OK" | |
| shell: | |
| name: Shell (bash -n + shellcheck) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: bash -n (syntax) | |
| run: | | |
| for f in *.sh; do echo "== $f =="; bash -n "$f"; done | |
| - name: shellcheck (errors only) | |
| run: | | |
| sudo apt-get update -qq | |
| sudo apt-get install -y -qq shellcheck | |
| for f in *.sh; do echo "== $f =="; shellcheck -S error "$f"; done |