Skip to content

Commit

Permalink
Merge pull request #797 from mikepenz/fix/794
Browse files Browse the repository at this point in the history
Fix condition resulting in an early abort for multiple `report_paths`
  • Loading branch information
mikepenz authored Feb 16, 2023
2 parents f89327e + a466fdb commit 204f987
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 17 deletions.
11 changes: 4 additions & 7 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

14 changes: 5 additions & 9 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,6 @@ export async function run(): Promise<void> {
mergedResult.skipped += testResult.skipped
mergedResult.failed += testResult.failed
mergedResult.passed += testResult.passed

const foundResults = testResult.totalCount > 0 || testResult.skipped > 0
if (!foundResults) {
if (requireTests) {
core.setFailed(`❌ No test results found for ${checkName}`)
}
return
}

testResults.push(testResult)
}

Expand All @@ -96,6 +87,11 @@ export async function run(): Promise<void> {
core.setOutput('skipped', mergedResult.skipped)
core.setOutput('failed', mergedResult.failed)

const foundResults = mergedResult.totalCount > 0 || mergedResult.skipped > 0
if (!foundResults && requireTests) {
core.setFailed(`❌ No test results found for ${checkName}`)
}

const pullRequest = github.context.payload.pull_request
const link = (pullRequest && pullRequest.html_url) || github.context.ref
const conclusion: 'success' | 'failure' =
Expand Down

0 comments on commit 204f987

Please sign in to comment.