Sync Boatstack from Intelligence Flow 09388a6c92ec (#18) #37
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
| # Boatstack-owned control plane. | |
| name: Verify Boatstack distribution | |
| on: | |
| pull_request: | |
| push: | |
| branches: [main] | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Detect projected runtime | |
| id: runtime | |
| shell: bash | |
| run: | | |
| if [[ -f boatstack/go.mod ]]; then | |
| echo "go=true" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "go=false" >> "$GITHUB_OUTPUT" | |
| fi | |
| - uses: actions/setup-go@v5 | |
| if: steps.runtime.outputs.go == 'true' | |
| with: | |
| go-version-file: boatstack/go.mod | |
| cache-dependency-path: boatstack/go.mod | |
| - run: go test ./... | |
| if: steps.runtime.outputs.go == 'true' | |
| working-directory: boatstack | |
| - run: go build ./cmd/boatstack-helper | |
| if: steps.runtime.outputs.go == 'true' | |
| working-directory: boatstack | |
| - uses: actions/setup-python@v5 | |
| if: steps.runtime.outputs.go != 'true' | |
| with: | |
| python-version: "3.11" | |
| - name: Verify legacy projection during migration | |
| if: steps.runtime.outputs.go != 'true' | |
| env: | |
| PYTHONUTF8: "1" | |
| run: python3 -m unittest discover -s tests -v | |
| - name: Compile legacy projection during migration | |
| if: steps.runtime.outputs.go != 'true' | |
| env: | |
| PYTHONUTF8: "1" | |
| run: python3 -m compileall -q boatstack | |
| - name: Validate Bash installer | |
| if: steps.runtime.outputs.go == 'true' && runner.os != 'Windows' | |
| shell: bash | |
| run: bash -n install.sh | |
| - name: Validate PowerShell installer | |
| if: steps.runtime.outputs.go == 'true' && runner.os == 'Windows' | |
| shell: pwsh | |
| run: | | |
| $tokens = $null | |
| $errors = $null | |
| [System.Management.Automation.Language.Parser]::ParseFile((Resolve-Path install.ps1), [ref]$tokens, [ref]$errors) > $null | |
| if ($errors.Count -gt 0) { | |
| $errors | ForEach-Object { Write-Error $_ } | |
| exit 1 | |
| } |