Skip to content

Conversation

@kevbite
Copy link
Contributor

@kevbite kevbite commented Sep 15, 2025

This pull request introduces a new feature that allows the workflow to fail if no tests are found in the test report, controlled by a new exit-on-empty option. This option is available both as a GitHub Action input and as a CLI flag. The implementation includes updates to documentation, input parsing, and core logic to support this feature.

New "exit on empty" feature:

  • Added a new exit-on-empty input/flag to both the GitHub Action (action.yml) and CLI, allowing users to configure the workflow to fail if no tests are found in the report. [1] [2] [3] [4]
  • Updated input handling functions (getInputs and getCliInputs) and the Inputs interface to include the new exitOnEmpty property. [1] [2] [3]
  • Implemented the exitActionOnEmpty function, which sets the workflow to failed if the test report contains zero tests, and integrated it into both action and CLI execution flows. [1] [2] [3] [4] [5]

Documentation updates:

  • Updated README.md to document the new exit-on-empty option, describing its purpose and default value.

#219

@Ma11hewThomas Ma11hewThomas self-assigned this Sep 21, 2025
@Ma11hewThomas Ma11hewThomas merged commit 195d91e into ctrf-io:main Sep 22, 2025
17 checks passed
@Ma11hewThomas
Copy link
Contributor

Thank you @kevbite, to be included in next release

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.

2 participants