Update stacked: 3 packages #231
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: smoke-test-coverage | |
| # REPORT-ONLY, NON-BLOCKING. For each package changed by a PR (or the whole | |
| # catalog on demand), report whether it carries a >=1 Standalone buildspec test | |
| # (gominimal/inbox#20 entry criterion). Writes nothing, needs no secrets, and | |
| # MUST NOT be a branch-protection required check — the "report-only spec first" | |
| # step of the promotion criteria. Complements version-age.yml (#279), | |
| # stable-closure-check.yml (#280) and dwell.yml. | |
| # | |
| # Pure text scan of tracked build.ncl: no `minimal dump`, no network. | |
| on: | |
| workflow_dispatch: {} | |
| pull_request: | |
| branches: ["main"] | |
| # Least privilege. Posts via GITHUB_STEP_SUMMARY, which needs no write scope. | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: smoke-test-coverage-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| report: | |
| runs-on: ubuntu-latest | |
| steps: | |
| # Pinned to a SHA (matches version-age.yml / dwell.yml). | |
| - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| with: | |
| fetch-depth: 0 # need base..head reachable for the changed-file diff | |
| - name: Package set | |
| id: pkgset | |
| env: | |
| # SHAs via env per repo convention (zizmor template-injection). | |
| BASE_SHA: ${{ github.event.pull_request.base.sha }} | |
| HEAD_SHA: ${{ github.event.pull_request.head.sha }} | |
| EVENT: ${{ github.event_name }} | |
| run: | | |
| set -uo pipefail | |
| if [ "$EVENT" = "pull_request" ]; then | |
| git diff --name-only "$BASE_SHA" "$HEAD_SHA" -- 'packages/*/build.ncl' \ | |
| | cut -d/ -f2 | sort -u > pkgs.txt || : > pkgs.txt | |
| echo "mode=file" >> "$GITHUB_OUTPUT" | |
| echo "count=$(wc -l < pkgs.txt | tr -d ' ')" >> "$GITHUB_OUTPUT" | |
| else | |
| : > pkgs.txt # --all scans the whole catalog | |
| echo "mode=all" >> "$GITHUB_OUTPUT" | |
| echo "count=1" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Smoke-test coverage report | |
| if: steps.pkgset.outputs.count != '0' | |
| run: | | |
| set -uo pipefail | |
| # Report-only: a genuine error is downgraded to a warning so the check | |
| # never reds. | |
| if [ "${{ steps.pkgset.outputs.mode }}" = "file" ]; then | |
| python3 .github/scripts/smoke_test_report.py --packages-file pkgs.txt \ | |
| || echo "::warning::smoke-test report hit an internal error; see logs (non-blocking)" | |
| else | |
| python3 .github/scripts/smoke_test_report.py --all \ | |
| || echo "::warning::smoke-test report hit an internal error; see logs (non-blocking)" | |
| fi | |
| - name: No package changes | |
| if: steps.pkgset.outputs.count == '0' | |
| run: echo "No packages/*/build.ncl changed in this PR — nothing to report." >> "$GITHUB_STEP_SUMMARY" |