Add exitOnNoFiles argument to fail action when no test files are found #222
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.
This pull request introduces a new input option to control workflow behavior when no test files are found, improving flexibility and error handling for test reporting. The main changes add support for an
exitOnNoFilesflag throughout the codebase, allowing users to configure whether the workflow should fail or succeed in such cases.Input and CLI enhancements
exit-on-no-filestoaction.ymland documented it inREADME.md, allowing users to specify if the workflow should fail when no test files are found. [1] [2]src/core/cli.tsand related interfaces to support the newexitOnNoFilesoption. [1] [2]Propagation and usage of the new option
exitOnNoFilesthrough input handling insrc/core/inputs.tsand theInputsinterface insrc/types/reporter.ts, ensuring the flag is available throughout the workflow. [1] [2] [3]__tests__/ctrf/report-preparation.test.tsto include the new input for testing purposes.Error handling and report reading
readCtrfReportsinsrc/utils/file-system.tsto accept and use theexitOnNoFilesflag, setting the workflow status to failure or success depending on the flag when no reports are found, and updated its usage insrc/ctrf/report-preparation.ts. [1] [2] [3]#221