mirror of
https://github.com/github/codeql-action.git
synced 2025-12-24 08:10:06 +08:00
Extract semantic CLI version from URL when requesting specific tools
This commit is contained in:
10
lib/setup-codeql.test.js
generated
10
lib/setup-codeql.test.js
generated
@@ -117,4 +117,14 @@ ava_1.default.beforeEach(() => {
|
||||
message: "Failed to find a release of the CodeQL tools that contains CodeQL CLI 2.12.1.",
|
||||
});
|
||||
});
|
||||
(0, ava_1.default)("getCodeQLSource sets CLI version for a semver tagged bundle", async (t) => {
|
||||
await (0, util_1.withTmpDir)(async (tmpDir) => {
|
||||
(0, testing_utils_1.setupActionsVars)(tmpDir, tmpDir);
|
||||
const tagName = "codeql-bundle-v1.2.3";
|
||||
(0, testing_utils_1.mockBundleDownloadApi)({ tagName });
|
||||
const source = await setupCodeql.getCodeQLSource(`https://github.com/github/codeql-action/releases/download/${tagName}/codeql-bundle-linux64.tar.gz`, testing_utils_1.SAMPLE_DEFAULT_CLI_VERSION, testing_utils_1.SAMPLE_DOTCOM_API_DETAILS, util_1.GitHubVariant.DOTCOM, (0, logging_1.getRunnerLogger)(true));
|
||||
t.is(source.sourceType, "download");
|
||||
t.is(source["cliVersion"], "1.2.3");
|
||||
});
|
||||
});
|
||||
//# sourceMappingURL=setup-codeql.test.js.map
|
||||
Reference in New Issue
Block a user