-
Notifications
You must be signed in to change notification settings - Fork 35
Closed
Description
A new argument, exitOnNoFiles, should be added to the action to align with the existing exitOnFail argument.
This flag would cause the GitHub Action to fail (exit with a non-zero code) if no test files are discovered. This is useful to ensure CI pipelines catch misconfigurations, missing test paths, or empty test suites early, instead of passing silently when no tests are actually run.
Motivation
Currently, if no test files are found, the action passes successfully, which can create a false sense of security. By adding exitOnNoFiles, we give users an explicit safeguard against incorrectly configured test patterns or missing test files.
Expected Behavior
- When
exitOnNoFiles: trueand no test files are discovered, the action should fail with a clear error message. - When
exitOnNoFiles: false(default), the action should retain its current behavior and pass even if no files are found.
Implementation Notes
- Should follow the same structure and implementation style as
exitOnFail. - Needs input handling in
action.yml. - Error message should clearly state: "No test files were found. Failing due to exitOnNoFiles being set."
- Documentation update required to describe the new argument.
Metadata
Metadata
Assignees
Labels
No labels