Factor out test mode determination code

This commit is contained in:
Henry Mercer 2022-04-28 19:07:04 +01:00
parent 0c3c093eba
commit 7c2be06006
9 changed files with 27 additions and 12 deletions

3
lib/actions-util.js generated
View file

@ -584,8 +584,7 @@ async function sendStatusReport(statusReport) {
const statusReportJSON = JSON.stringify(statusReport);
core.debug(`Sending status report: ${statusReportJSON}`);
// If in test mode we don't want to upload the results
const testMode = process.env["TEST_MODE"] === "true" || false;
if (testMode) {
if ((0, util_1.isInTestMode)()) {
core.debug("In test mode. Status reports are not uploaded.");
return true;
}