Add createCheck to display test results in GitHub UI
parent
24d6634cb6
commit
b3bcba9d25
|
|
@ -29,4 +29,6 @@ fi;
|
||||||
# Exit with code from the build step.
|
# Exit with code from the build step.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
if [ $USE_EXIT_CODE = true ]; then
|
||||||
exit $TEST_RUNNER_EXIT_CODE
|
exit $TEST_RUNNER_EXIT_CODE
|
||||||
|
fi;
|
||||||
|
|
|
||||||
12
src/index.js
12
src/index.js
|
|
@ -30,16 +30,20 @@ async function action() {
|
||||||
testMode,
|
testMode,
|
||||||
artifactsPath,
|
artifactsPath,
|
||||||
useHostNetwork,
|
useHostNetwork,
|
||||||
|
createCheck,
|
||||||
customParameters,
|
customParameters,
|
||||||
});
|
});
|
||||||
|
|
||||||
if (createCheck) {
|
|
||||||
await ResultsCheck.publishResults(artifactsPath, githubToken);
|
|
||||||
}
|
|
||||||
} finally {
|
} finally {
|
||||||
// Set output
|
// Set output
|
||||||
await Output.setArtifactsPath(artifactsPath);
|
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 => {
|
action().catch(error => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue