mirror of
https://github.com/dorny/test-reporter.git
synced 2025-12-15 22:07:09 +01:00
add feature fail-on-empty
This commit is contained in:
parent
e9fa2f582c
commit
9e78da5e1b
4 changed files with 11 additions and 2 deletions
|
|
@ -40,6 +40,7 @@ class TestReporter {
|
|||
readonly listTests = core.getInput('list-tests', {required: true}) as 'all' | 'failed' | 'none'
|
||||
readonly maxAnnotations = parseInt(core.getInput('max-annotations', {required: true}))
|
||||
readonly failOnError = core.getInput('fail-on-error', {required: true}) === 'true'
|
||||
readonly failOnEmpty = core.getInput('fail-on-empty', {required: true}) === 'true'
|
||||
readonly workDirInput = core.getInput('working-directory', {required: false})
|
||||
readonly onlySummary = core.getInput('only-summary', {required: false}) === 'true'
|
||||
readonly token = core.getInput('token', {required: true})
|
||||
|
|
@ -135,7 +136,7 @@ class TestReporter {
|
|||
return
|
||||
}
|
||||
|
||||
if (results.length === 0) {
|
||||
if (results.length === 0 && this.failOnEmpty) {
|
||||
core.setFailed(`No test report files were found`)
|
||||
return
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue