Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main'
Browse files Browse the repository at this point in the history
# Conflicts:
#	dist/index.js
#	dist/index.js.map
#	src/main.ts
  • Loading branch information
zigavehovec committed Nov 16, 2023
2 parents 3118ebf + 0831a82 commit 31d6e9e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 67 deletions.
67 changes: 1 addition & 66 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.

8 changes: 8 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,14 @@ export async function run(): Promise<void> {
return // end if we failed due to no passed tests, but configured to require passed tests
}

if (!(mergedResult.totalCount > 0 || mergedResult.skipped > 0) && requireTests) {
core.setFailed(`❌ No test results found for ${checkName}`)
return // end if we failed due to no tests, but configured to require tests
} else if (!(mergedResult.passed > 0) && requirePassedTests) {
core.setFailed(`❌ No passed test results found for ${checkName}`)
return // end if we failed due to no passed tests, but configured to require passed tests
}

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

0 comments on commit 31d6e9e

Please sign in to comment.