if the project does not compile and we have github token. we have tests 0/0, with failed 0. so setFailed is not set.

pull/137/head
Ivan Hernandez 2021-07-19 19:12:23 +02:00
parent 4d6a166cb7
commit bfe09c7c40
3 changed files with 4 additions and 4 deletions

File diff suppressed because one or more lines are too long

View File

@ -41,8 +41,8 @@ async function action() {
}
if (githubToken) {
const failedTestCount = await ResultsCheck.createCheck(artifactsPath, githubToken, checkName);
if (failedTestCount >= 1) {
const runSummary = await ResultsCheck.createCheck(artifactsPath, githubToken, checkName);
if (runSummary.failed >= 1 || runSummary.total === 0 || runSummary.passed === 0) {
core.setFailed(`Test(s) Failed! Check '${checkName}' for details.`);
}
}

View File

@ -69,7 +69,7 @@ class ResultsCheck {
// Call GitHub API
await ResultsCheck.requestGitHubCheck(githubToken, checkName, output);
return runSummary.failed;
return runSummary;
}
static async requestGitHubCheck(githubToken, checkName, output) {