Excise Python port: alibi is now PowerShell-only; port moved to Sutai… #22
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: | |
| jobs: | |
| powershell: | |
| name: powershell parse-check | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Parse-check every .ps1 | |
| shell: pwsh | |
| run: | | |
| $files = Get-ChildItem -Path alibi-engine/scanner -Recurse -Filter '*.ps1' -ErrorAction SilentlyContinue | |
| $hadError = $false | |
| foreach ($f in $files) { | |
| $tokens = $null; $errors = $null | |
| [System.Management.Automation.Language.Parser]::ParseFile($f.FullName, [ref]$tokens, [ref]$errors) | Out-Null | |
| if ($errors.Count -gt 0) { | |
| Write-Host ("FAIL {0}" -f $f.FullName) -ForegroundColor Red | |
| $errors | ForEach-Object { Write-Host (" line {0}: {1}" -f $_.Extent.StartLineNumber, $_.Message) } | |
| $hadError = $true | |
| } else { | |
| Write-Host ("ok {0}" -f $f.FullName) | |
| } | |
| } | |
| if ($hadError) { exit 1 } |