Add createCheck to display test results in GitHub UI

pull/97/head
David Finol 2021-02-22 22:27:55 -06:00
parent 24d6634cb6
commit b3bcba9d25
2 changed files with 10 additions and 4 deletions

View File

@ -29,4 +29,6 @@ fi;
# Exit with code from the build step.
#
if [ $USE_EXIT_CODE = true ]; then
exit $TEST_RUNNER_EXIT_CODE
fi;

View File

@ -30,16 +30,20 @@ async function action() {
testMode,
artifactsPath,
useHostNetwork,
createCheck,
customParameters,
});
if (createCheck) {
await ResultsCheck.publishResults(artifactsPath, githubToken);
}
} finally {
// Set output
await Output.setArtifactsPath(artifactsPath);
}
if (createCheck) {
const fail = await ResultsCheck.publishResults(artifactsPath, githubToken);
if (fail > 0) {
core.setFailed('Tests Failed! See Test Results for details.');
}
}
}
action().catch(error => {