Don't wait for processing in test mode
In test mode, we don't upload results, so there's no point waiting for processing.
This commit is contained in:
parent
7c2be06006
commit
ea676e3184
6 changed files with 22 additions and 6 deletions
|
|
@ -196,7 +196,10 @@ async function run() {
|
|||
// Possibly upload the database bundles for remote queries
|
||||
await uploadDatabases(repositoryNwo, config, apiDetails, logger);
|
||||
|
||||
if (
|
||||
// We don't upload results in test mode, so don't wait for processing
|
||||
if (util.isInTestMode()) {
|
||||
core.debug("In test mode. Waiting for processing is disabled.");
|
||||
} else if (
|
||||
uploadResult !== undefined &&
|
||||
actionsUtil.getRequiredInput("wait-for-processing") === "true"
|
||||
) {
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import {
|
|||
checkActionVersion,
|
||||
getRequiredEnvParam,
|
||||
initializeEnvironment,
|
||||
isInTestMode,
|
||||
Mode,
|
||||
} from "./util";
|
||||
|
||||
|
|
@ -66,7 +67,11 @@ async function run() {
|
|||
getActionsLogger()
|
||||
);
|
||||
core.setOutput("sarif-id", uploadResult.sarifID);
|
||||
if (actionsUtil.getRequiredInput("wait-for-processing") === "true") {
|
||||
|
||||
// We don't upload results in test mode, so don't wait for processing
|
||||
if (isInTestMode()) {
|
||||
core.debug("In test mode. Waiting for processing is disabled.");
|
||||
} else if (actionsUtil.getRequiredInput("wait-for-processing") === "true") {
|
||||
await upload_lib.waitForProcessing(
|
||||
parseRepositoryNwo(getRequiredEnvParam("GITHUB_REPOSITORY")),
|
||||
uploadResult.sarifID,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue