fix(boatstack): reconcile stale update receipts #325
Workflow file for this run
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: Verify Boatstack lab | |
| on: | |
| pull_request: | |
| paths: | |
| - "labs/12-product-engineering-loop/**" | |
| - ".github/workflows/boatstack-lab.yml" | |
| - ".github/scripts/ci_shard.py" | |
| push: | |
| branches: [main] | |
| paths: | |
| - "labs/12-product-engineering-loop/**" | |
| - ".github/workflows/boatstack-lab.yml" | |
| - ".github/scripts/ci_shard.py" | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: boatstack-lab-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| # Unix runners run the full suite serially — fast enough (~1-2 min) and the | |
| # unsharded correctness reference. Windows is handled by `runtime-windows`. | |
| runtime: | |
| name: Runtime (${{ matrix.os }}) | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| runs-on: ${{ matrix.os }} | |
| defaults: | |
| run: | |
| working-directory: labs/12-product-engineering-loop/product-engineering-loop | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: ./.github/actions/go-setup | |
| with: | |
| go-version-file: labs/12-product-engineering-loop/product-engineering-loop/go.mod | |
| cache-dependency-path: labs/12-product-engineering-loop/product-engineering-loop/go.sum | |
| - name: Show toolchain | |
| run: go version | |
| - name: Test runtime | |
| run: go test ./... | |
| - name: Build helper | |
| run: go build ./cmd/boatstack-helper | |
| - name: Validate Bash installer | |
| shell: bash | |
| run: bash -n ../boatstack-distribution/install.sh.template | |
| # Windows `go test` is dominated by per-process spawn latency (each test spawns | |
| # several `git` processes; the suite is ~330 tests run serially), so the full | |
| # suite takes ~15 min on Windows vs ~1 min on Unix. In-process t.Parallel() is | |
| # unsafe here (the package swaps ~14 global function-seams), so we shard across | |
| # processes instead: N runners, each running a disjoint, balanced subset. Shard | |
| # assignment is an LPT makespan-minimization controller — see | |
| # .github/scripts/ci_shard.py. Target: slowest shard < 5 min. | |
| runtime-windows: | |
| name: Runtime (windows-latest, shard ${{ matrix.shard }}) | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| shard: [0, 1, 2, 3, 4, 5] | |
| runs-on: windows-latest | |
| defaults: | |
| run: | |
| working-directory: labs/12-product-engineering-loop/product-engineering-loop | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: ./.github/actions/go-setup | |
| with: | |
| go-version-file: labs/12-product-engineering-loop/product-engineering-loop/go.mod | |
| cache-dependency-path: labs/12-product-engineering-loop/product-engineering-loop/go.sum | |
| - name: Show toolchain | |
| run: go version | |
| # Enumerate tests, pick this shard's balanced subset, and run only those. | |
| # `go test -list` and `go test -run` share the warm GOCACHE, so the second | |
| # compile is a cache hit. An empty shard (fewer tests than shards) is a | |
| # clean skip — never `go test -run ''`, which would run the whole suite. | |
| - name: Test shard ${{ matrix.shard }} | |
| shell: bash | |
| run: | | |
| regex=$(go test -list '^Test' ./... | python "${{ github.workspace }}/.github/scripts/ci_shard.py" --total 6 --index ${{ matrix.shard }}) | |
| if [ -z "$regex" ]; then | |
| echo "Shard ${{ matrix.shard }} is empty; nothing to run." | |
| exit 0 | |
| fi | |
| echo "Shard ${{ matrix.shard }} selects $(( $(grep -o '|' <<<"$regex" | wc -l) + 1 )) tests" | |
| go test -run "$regex" ./... | |
| # Windows-only, non-test validation runs once (on shard 0), not per shard. | |
| - name: Build helper | |
| if: matrix.shard == '0' | |
| run: go build ./cmd/boatstack-helper | |
| - name: Validate PowerShell installer | |
| if: matrix.shard == '0' | |
| shell: pwsh | |
| run: | | |
| $tokens = $null | |
| $errors = $null | |
| $path = Resolve-Path ../boatstack-distribution/install.ps1.template | |
| [System.Management.Automation.Language.Parser]::ParseFile($path, [ref]$tokens, [ref]$errors) > $null | |
| if ($errors.Count -gt 0) { | |
| $errors | ForEach-Object { Write-Error $_ } | |
| exit 1 | |
| } | |
| projection: | |
| name: Generated distribution | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 0 | |
| - uses: ./.github/actions/go-setup | |
| with: | |
| go-version-file: labs/12-product-engineering-loop/product-engineering-loop/go.mod | |
| cache-dependency-path: labs/12-product-engineering-loop/product-engineering-loop/go.sum | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.11" | |
| - name: Require an append-only release message | |
| if: github.event_name == 'pull_request' | |
| run: >- | |
| python labs/12-product-engineering-loop/scripts/release_notes.py check-policy | |
| --repo . | |
| --base "${{ github.event.pull_request.base.sha }}" | |
| --head "${{ github.event.pull_request.head.sha }}" | |
| - name: Verify projection and public surface | |
| run: python -m unittest discover -s labs/12-product-engineering-loop/tests -p 'test_*.py' |