Skip to content

feat(runner): add --log-gha for GitHub Actions annotations#632

Merged
Chemaclass merged 2 commits intomainfrom
feat/gha-log-format
Apr 19, 2026
Merged

feat(runner): add --log-gha for GitHub Actions annotations#632
Chemaclass merged 2 commits intomainfrom
feat/gha-log-format

Conversation

@Chemaclass
Copy link
Copy Markdown
Member

🤔 Background

Related #280

Running bashunit in GitHub Actions does not surface failures on the "Files changed" tab of a pull request. Emitting workflow commands for failed, risky and incomplete tests fixes that with zero extra tooling.

💡 Changes

  • Add --log-gha <file> flag and BASHUNIT_LOG_GHA env var that write ::error, ::warning and ::notice lines for failed, risky and incomplete tests.
  • Percent-encode reserved characters and strip ANSI color codes so multiline/colored failure messages render correctly as annotations.
  • Document the flag in docs/command-line.md and docs/configuration.md, with a GitHub Actions usage snippet.

Emit `::error`, `::warning`, `::notice` workflow commands for failed,
risky and incomplete tests so bashunit results appear as inline
annotations in the "Files changed" tab of a pull request.
@Chemaclass Chemaclass added the enhancement New feature or request label Apr 19, 2026
@Chemaclass Chemaclass self-assigned this Apr 19, 2026
@Chemaclass Chemaclass added the enhancement New feature or request label Apr 19, 2026
- Optimize GHA message encoder: drop awk+sed pipeline, use Bash 3.0+
  parameter expansion `${var//pat/repl}` for percent-encoding.
- Acceptance tests: tolerate nonzero exit from inner bashunit run so
  `set -e` from --strict does not abort before assertions, and use a
  mktemp path to avoid filename collisions.
@Chemaclass Chemaclass merged commit 1cdbc6e into main Apr 19, 2026
30 checks passed
@Chemaclass Chemaclass deleted the feat/gha-log-format branch April 19, 2026 15:22
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