Skip to content

Add platform matrix and binary assertion to example job#69

Open
kitsuyui wants to merge 4 commits into
mainfrom
fix/audit-no-coverage-and-platform-matrix-uncovered-001
Open

Add platform matrix and binary assertion to example job#69
kitsuyui wants to merge 4 commits into
mainfrom
fix/audit-no-coverage-and-platform-matrix-uncovered-001

Conversation

@kitsuyui

@kitsuyui kitsuyui commented Jun 9, 2026

Copy link
Copy Markdown
Member

Summary

The example job ran only on ubuntu-latest with no assertion after uses: ./, so silent regressions on macOS or in the binary installation path were invisible to CI.

  • Add strategy.matrix.os: [ubuntu-latest, macos-latest] to the example job, covering Linux-X64 and macOS-ARM64 platform branches declared in action.yml
  • Add a verify binary is accessible after action step that runs gitignore.in --version, asserting the binary download, SHA256 verify, extract, and $GITHUB_PATH registration all succeeded

Verification

  • actionlint passes with no findings
  • shellcheck scripts/*.sh passes with no findings
  • Existing diff-detection job already runs on [ubuntu-latest, macos-latest]; this change brings example to parity

Trade-offs

  • Linux-ARM64 and macOS-X64 platform branches remain untested; adding ubuntu-24.04-arm and macos-13 runners is a follow-on structural improvement
  • Coverage measurement for the composite action is out of scope for this change

@kitsuyui kitsuyui force-pushed the fix/audit-no-coverage-and-platform-matrix-uncovered-001 branch from 9196bea to 1e08209 Compare June 10, 2026 17:50
kitsuyui added 2 commits June 11, 2026 22:36
Extends the example job to run on both ubuntu-latest and macos-latest,
covering Linux-X64 and macOS-ARM64 platform branches declared in action.yml.

Adds a verification step after the action runs to assert that the
gitignore.in binary is accessible in PATH, catching silent regressions
where the download or PATH registration fails without exiting non-zero.
install-gibo@v0.1.0 (9e7dba9) hardcodes gibo_Linux_x86_64.tar.gz for
all platforms. On macOS-ARM64 runners this downloads a Linux x86_64
binary that cannot execute, causing exit code 126.

Update the pin to 190df5c (current main) which selects the correct
platform-specific archive based on RUNNER_OS and RUNNER_ARCH.
@kitsuyui kitsuyui force-pushed the fix/audit-no-coverage-and-platform-matrix-uncovered-001 branch from 1e08209 to 3174e7a Compare June 11, 2026 13:37
kitsuyui added 2 commits June 12, 2026 11:57
The platform matrix renamed the example job to `test (ubuntu-latest)` /
`test (macos-latest)`, so the `default-branch-baseline` ruleset's required
`test` context was no longer produced and `required-status-checks` failed.

Add a small aggregation job whose id is `test`, gated on the example matrix
via `needs`, so a single `test` status context is produced again. With
`if: always()` it always reports and is green only when every matrix leg
succeeds, keeping the new macOS/ubuntu coverage while restoring the required
context name.
The `test` aggregation gate is gated on the example matrix via `needs`, so its
status context is not registered until the matrix finishes. The guard job ran
concurrently and queried `gh pr checks` before `test` existed, reporting it as
missing. Make the guard `needs: [test]` (with `if: always()`) so it evaluates
after every required context — including the gated `test` — has registered.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant