mirror of
https://github.com/github/codeql-action.git
synced 2026-01-04 21:50:17 +08:00
Merge branch 'main' into henrymercer/language-extensibility
This commit is contained in:
@@ -49,7 +49,6 @@ test("analyze action with RAM & threads from environment variables", async (t) =
|
||||
requiredInputStub.withArgs("upload-database").returns("false");
|
||||
requiredInputStub.withArgs("output").returns("out");
|
||||
const optionalInputStub = sinon.stub(actionsUtil, "getOptionalInput");
|
||||
optionalInputStub.withArgs("cleanup-level").returns("none");
|
||||
optionalInputStub.withArgs("expect-error").returns("false");
|
||||
sinon.stub(api, "getGitHubVersion").resolves(gitHubVersion);
|
||||
setupActionsVars(tmpDir, tmpDir);
|
||||
|
||||
@@ -47,7 +47,6 @@ test("analyze action with RAM & threads from action inputs", async (t) => {
|
||||
requiredInputStub.withArgs("upload-database").returns("false");
|
||||
requiredInputStub.withArgs("output").returns("out");
|
||||
const optionalInputStub = sinon.stub(actionsUtil, "getOptionalInput");
|
||||
optionalInputStub.withArgs("cleanup-level").returns("none");
|
||||
optionalInputStub.withArgs("expect-error").returns("false");
|
||||
sinon.stub(api, "getGitHubVersion").resolves(gitHubVersion);
|
||||
sinon.stub(gitUtils, "isAnalyzingDefaultBranch").resolves(true);
|
||||
|
||||
@@ -301,15 +301,23 @@ async function run() {
|
||||
logger,
|
||||
);
|
||||
|
||||
if (actionsUtil.getOptionalInput("cleanup-level") !== "") {
|
||||
logger.info(
|
||||
"The 'cleanup-level' input is ignored since the CodeQL Action no longer writes intermediate results to the database. This input can safely be removed from your workflow.",
|
||||
);
|
||||
}
|
||||
|
||||
// An overlay-base database should always use the 'overlay' cleanup level
|
||||
// to preserve the cached intermediate results.
|
||||
//
|
||||
// Note that we may be overriding the 'cleanup-level' input parameter.
|
||||
// Otherwise, use cleanup level 'none'. We are already discarding
|
||||
// intermediate results during evaluation with '--expect-discarded-cache',
|
||||
// so there is nothing to clean up.
|
||||
const cleanupLevel =
|
||||
config.augmentationProperties.overlayDatabaseMode ===
|
||||
OverlayDatabaseMode.OverlayBase
|
||||
? "overlay"
|
||||
: actionsUtil.getOptionalInput("cleanup-level") || "brutal";
|
||||
: "none";
|
||||
|
||||
if (actionsUtil.getRequiredInput("skip-queries") !== "true") {
|
||||
runStats = await runQueries(
|
||||
|
||||
Reference in New Issue
Block a user