Skip to content

Commit

Permalink
Fall back to gzip if zstd fails
Browse files Browse the repository at this point in the history
  • Loading branch information
henrymercer committed Sep 23, 2024
1 parent 662c71a commit 4d015b8
Show file tree
Hide file tree
Showing 6 changed files with 82 additions and 33 deletions.
27 changes: 20 additions & 7 deletions lib/setup-codeql.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/setup-codeql.js.map

Large diffs are not rendered by default.

11 changes: 3 additions & 8 deletions lib/setup-codeql.test.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/setup-codeql.test.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 3 additions & 10 deletions src/setup-codeql.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import * as sinon from "sinon";
import * as actionsUtil from "./actions-util";
import { getRunnerLogger } from "./logging";
import * as setupCodeql from "./setup-codeql";
import { ZstdAvailability } from "./tar";
import {
LINKED_CLI_VERSION,
LoggedMessage,
Expand Down Expand Up @@ -91,7 +90,7 @@ test("getCodeQLSource sets CLI version for a semver tagged bundle", async (t) =>
SAMPLE_DEFAULT_CLI_VERSION,
SAMPLE_DOTCOM_API_DETAILS,
GitHubVariant.DOTCOM,
getStubZstdAvailability(),
false,
createFeatures([]),
getRunnerLogger(true),
);
Expand All @@ -109,7 +108,7 @@ test("getCodeQLSource correctly returns bundled CLI version when tools == linked
SAMPLE_DEFAULT_CLI_VERSION,
SAMPLE_DOTCOM_API_DETAILS,
GitHubVariant.DOTCOM,
getStubZstdAvailability(),
false,
createFeatures([]),
getRunnerLogger(true),
);
Expand All @@ -130,7 +129,7 @@ test("getCodeQLSource correctly returns bundled CLI version when tools == latest
SAMPLE_DEFAULT_CLI_VERSION,
SAMPLE_DOTCOM_API_DETAILS,
GitHubVariant.DOTCOM,
getStubZstdAvailability(),
false,
createFeatures([]),
logger,
);
Expand Down Expand Up @@ -246,9 +245,3 @@ test("setupCodeQLBundle logs the CodeQL CLI version being used when asked to dow
);
});
});

function getStubZstdAvailability(): ZstdAvailability {
return {
available: false,
};
}
Loading

0 comments on commit 4d015b8

Please sign in to comment.