Skip to content

Commit

Permalink
Merge pull request #1514 from github/update-v2.2.1-4664f3969
Browse files Browse the repository at this point in the history
Merge main into releases/v2
  • Loading branch information
angelapwen committed Jan 27, 2023
2 parents 436dbd9 + 2ae6e13 commit 3ebbd71
Show file tree
Hide file tree
Showing 10 changed files with 26 additions and 20 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# CodeQL Action Changelog

## 2.2.1 - 27 Jan 2023

No user facing changes.

## 2.2.0 - 26 Jan 2023

- Improve stability when choosing the default version of CodeQL to use in code scanning workflow runs on Actions on github.com. [#1475](https://github.com/github/codeql-action/pull/1475)
Expand Down
12 changes: 6 additions & 6 deletions lib/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/codeql.test.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion 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.

2 changes: 1 addition & 1 deletion node_modules/.package-lock.json

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

4 changes: 2 additions & 2 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "codeql",
"version": "2.2.0",
"version": "2.2.1",
"private": true,
"description": "CodeQL action",
"scripts": {
Expand Down
12 changes: 6 additions & 6 deletions src/codeql.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ test("downloads and caches explicitly requested bundles that aren't in the toolc
t.assert(toolcache.find("CodeQL", `0.0.0-${version}`));
t.is(result.toolsVersion, `0.0.0-${version}`);
t.is(result.toolsSource, ToolsSource.Download);
t.is(typeof result.toolsDownloadDurationMs, "number");
t.assert(Number.isInteger(result.toolsDownloadDurationMs));
}

t.is(toolcache.findAllVersions("CodeQL").length, 2);
Expand Down Expand Up @@ -241,7 +241,7 @@ test("downloads an explicitly requested bundle even if a different version is ca
t.assert(toolcache.find("CodeQL", "0.0.0-20200610"));
t.deepEqual(result.toolsVersion, "0.0.0-20200610");
t.is(result.toolsSource, ToolsSource.Download);
t.not(result.toolsDownloadDurationMs, undefined);
t.assert(Number.isInteger(result.toolsDownloadDurationMs));
});
});

Expand Down Expand Up @@ -293,7 +293,7 @@ for (const {
t.assert(toolcache.find("CodeQL", expectedToolcacheVersion));
t.deepEqual(result.toolsVersion, cliVersion);
t.is(result.toolsSource, ToolsSource.Download);
t.not(result.toolsDownloadDurationMs, undefined);
t.assert(Number.isInteger(result.toolsDownloadDurationMs));
});
});
}
Expand Down Expand Up @@ -428,7 +428,7 @@ for (const variant of [util.GitHubVariant.GHAE, util.GitHubVariant.GHES]) {
);
t.deepEqual(result.toolsVersion, defaults.cliVersion);
t.is(result.toolsSource, ToolsSource.Download);
t.is(typeof result.toolsDownloadDurationMs, "number");
t.assert(Number.isInteger(result.toolsDownloadDurationMs));

const cachedVersions = toolcache.findAllVersions("CodeQL");
t.is(cachedVersions.length, 2);
Expand Down Expand Up @@ -461,7 +461,7 @@ test('downloads bundle if "latest" tools specified but not cached', async (t) =>
);
t.deepEqual(result.toolsVersion, defaults.cliVersion);
t.is(result.toolsSource, ToolsSource.Download);
t.is(typeof result.toolsDownloadDurationMs, "number");
t.assert(Number.isInteger(result.toolsDownloadDurationMs));

const cachedVersions = toolcache.findAllVersions("CodeQL");
t.is(cachedVersions.length, 2);
Expand Down Expand Up @@ -527,7 +527,7 @@ test("download codeql bundle from github ae endpoint", async (t) => {
);

t.is(result.toolsSource, ToolsSource.Download);
t.is(typeof result.toolsDownloadDurationMs, "number");
t.assert(Number.isInteger(result.toolsDownloadDurationMs));

const cachedVersions = toolcache.findAllVersions("CodeQL");
t.is(cachedVersions.length, 1);
Expand Down
4 changes: 3 additions & 1 deletion src/setup-codeql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,9 @@ export async function downloadCodeQL(
undefined,
finalHeaders
);
const toolsDownloadDurationMs = performance.now() - toolsDownloadStart;
const toolsDownloadDurationMs = Math.round(
performance.now() - toolsDownloadStart
);

logger.debug(`CodeQL bundle download to ${codeqlPath} complete.`);

Expand Down

0 comments on commit 3ebbd71

Please sign in to comment.