Skip to content

feat(ci): optional args input to run bashunit after install#697

Merged
Chemaclass merged 1 commit into
mainfrom
feat/action-args
Jun 7, 2026
Merged

feat(ci): optional args input to run bashunit after install#697
Chemaclass merged 1 commit into
mainfrom
feat/action-args

Conversation

@Chemaclass

Copy link
Copy Markdown
Member

What

Adds an optional args input to the TypedDevs/bashunit action. When set, the action runs bashunit <args> right after installing — so a workflow can install and run the suite in a single step:

- uses: TypedDevs/bashunit@0.38.0
  with:
    args: tests/ --strict

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 bashunit action and its maintenance/version-skew cost, while keeping the idiomatic uses: + run: bashunit ... path fully available.

Changes

  • action.yml: args input + run step (bashunit $BASHUNIT_ARGS, intentional word-split).
  • .github/workflows/test-action.yml: new run-via-args job proving invocation — a passing test via args succeeds, a failing test via args makes the step fail (continue-on-error + outcome assertion). If args were ignored, the failing case would pass and the job would fail.
  • docs/installation.md: install + run example, args documented; also repaired a malformed code-group split by earlier edits.
  • CHANGELOG updated.

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.

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.
@Chemaclass Chemaclass added the enhancement New feature or request label Jun 7, 2026
@Chemaclass Chemaclass self-assigned this Jun 7, 2026
@Chemaclass Chemaclass merged commit 1b3f3a0 into main Jun 7, 2026
34 checks passed
@Chemaclass Chemaclass deleted the feat/action-args branch June 7, 2026 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant