Store dependency caches in analyze Action

This commit is contained in:
Michael B. Gale 2024-07-26 13:34:24 +01:00
parent 471ed9f4c5
commit 5b057af8ce
No known key found for this signature in database
GPG key ID: FF5E2765BD00628F
6 changed files with 13 additions and 18 deletions

View file

@ -19,6 +19,7 @@ import { runAutobuild } from "./autobuild";
import { getCodeQL } from "./codeql";
import { Config, getConfig } from "./config-utils";
import { uploadDatabases } from "./database-upload";
import { uploadDependencyCaches } from "./dependency-caching";
import { EnvVar } from "./environment";
import { Features } from "./feature-flags";
import { Language } from "./languages";
@ -328,6 +329,11 @@ async function run() {
logger,
);
// Store dependency cache(s) if dependency caching is enabled.
if (config.dependencyCachingEnabled) {
await uploadDependencyCaches(config, logger);
}
// We don't upload results in test mode, so don't wait for processing
if (util.isInTestMode()) {
logger.debug("In test mode. Waiting for processing is disabled.");

View file

@ -14,7 +14,6 @@ import {
import { getGitHubVersion } from "./api-client";
import { Config, getConfig } from "./config-utils";
import * as debugArtifacts from "./debug-artifacts";
import { uploadDependencyCaches } from "./dependency-caching";
import { Features } from "./feature-flags";
import * as initActionPostHelper from "./init-action-post-helper";
import { getActionsLogger } from "./logging";
@ -26,7 +25,6 @@ import {
getActionsStatus,
ActionName,
getJobStatusDisplayName,
JobStatus,
} from "./status-report";
import {
checkDiskUsage,
@ -118,14 +116,6 @@ async function runWrapper() {
};
await sendStatusReport(statusReport);
}
// Store dependency cache(s) if the job was successful and dependency caching is enabled.
if (
jobStatus === JobStatus.SuccessStatus &&
config.dependencyCachingEnabled
) {
await uploadDependencyCaches(config, logger);
}
}
void runWrapper();