Add platform matrix and binary assertion to example job#69
Open
kitsuyui wants to merge 4 commits into
Open
Conversation
9196bea to
1e08209
Compare
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.
1e08209 to
3174e7a
Compare
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.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The
examplejob ran only onubuntu-latestwith no assertion afteruses: ./, so silent regressions on macOS or in the binary installation path were invisible to CI.strategy.matrix.os: [ubuntu-latest, macos-latest]to theexamplejob, covering Linux-X64 and macOS-ARM64 platform branches declared inaction.ymlverify binary is accessible after actionstep that runsgitignore.in --version, asserting the binary download, SHA256 verify, extract, and$GITHUB_PATHregistration all succeededVerification
actionlintpasses with no findingsshellcheck scripts/*.shpasses with no findingsdiff-detectionjob already runs on[ubuntu-latest, macos-latest]; this change bringsexampleto parityTrade-offs
ubuntu-24.04-armandmacos-13runners is a follow-on structural improvement