feat(ci): optional args input to run bashunit after install#697
Merged
Conversation
The action gains an 'args' input: when non-empty it runs 'bashunit <args>' after installing, so a workflow can install and run the suite in one step (e.g. args: 'tests/ --strict'). Empty keeps install-only behavior. A failing suite propagates a non-zero exit and fails the step. Adds a dogfood CI job covering both the passing and failing args paths, plus docs and an 'install + run' example. Also fixes the GitHub Actions code-group that had been split into a malformed second group.
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.
What
Adds an optional
argsinput to theTypedDevs/bashunitaction. When set, the action runsbashunit <args>right after installing — so a workflow can install and run the suite in a single step:Empty
args(default) keeps the existing install-only behavior. A failing suite propagates a non-zero exit and fails the step.This is the "one action, both modes" approach — avoids a second
use bashunitaction and its maintenance/version-skew cost, while keeping the idiomaticuses:+run: bashunit ...path fully available.Changes
action.yml:argsinput + run step (bashunit $BASHUNIT_ARGS, intentional word-split)..github/workflows/test-action.yml: newrun-via-argsjob proving invocation — a passing test via args succeeds, a failing test via args makes the step fail (continue-on-error+ outcome assertion). Ifargswere ignored, the failing case would pass and the job would fail.docs/installation.md:install + runexample,argsdocumented; also repaired a malformed code-group split by earlier edits.Tests
No
src//tests/changes — behavior verified by local simulation (passing run → exit 0; failing run → exit 1) and the new CI dogfood job on real runners.