mirror of
https://github.com/dorny/test-reporter.git
synced 2025-12-17 06:47:09 +01:00
Don't fail empty results if failOnError is False
This also changes how the check is created, failing the check on failing tests. This resolves #217 and also resolves #161.
This commit is contained in:
parent
e9fa2f582c
commit
afd11d4524
1 changed files with 2 additions and 2 deletions
|
|
@ -135,7 +135,7 @@ class TestReporter {
|
|||
return
|
||||
}
|
||||
|
||||
if (results.length === 0) {
|
||||
if (this.failOnError && results.length === 0) {
|
||||
core.setFailed(`No test report files were found`)
|
||||
return
|
||||
}
|
||||
|
|
@ -179,7 +179,7 @@ class TestReporter {
|
|||
core.info('Creating annotations')
|
||||
const annotations = getAnnotations(results, this.maxAnnotations)
|
||||
|
||||
const isFailed = this.failOnError && results.some(tr => tr.result === 'failed')
|
||||
const isFailed = results.some(tr => tr.result === 'failed')
|
||||
const conclusion = isFailed ? 'failure' : 'success'
|
||||
const icon = isFailed ? Icon.fail : Icon.success
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue