mirror of
https://github.com/github/codeql-action.git
synced 2026-10-03 09:14:58 +00:00
Address review comments
- Stub process.platform/arch in the supported-platform test and loop over all supported pairs (including linux/arm64) so it no longer depends on the host - Run the default queries in the Linux Arm64 PR check so the databases are finalized end-to-end Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: fb7e2d12-6620-4a67-9c1c-4e82f4a5e8d9
This commit is contained in:
1
.github/workflows/__linux-arm64.yml
generated
vendored
1
.github/workflows/__linux-arm64.yml
generated
vendored
@@ -76,7 +76,6 @@ jobs:
|
||||
run: go build main.go
|
||||
- uses: ./../action/analyze
|
||||
with:
|
||||
skip-queries: true
|
||||
upload-database: false
|
||||
- name: Assert databases exist
|
||||
run: |
|
||||
|
||||
@@ -18,7 +18,6 @@ steps:
|
||||
run: go build main.go
|
||||
- uses: ./../action/analyze
|
||||
with:
|
||||
skip-queries: true
|
||||
upload-database: false
|
||||
- name: Assert databases exist
|
||||
run: |
|
||||
|
||||
@@ -156,20 +156,34 @@ for (const [platform, arch] of [
|
||||
);
|
||||
}
|
||||
|
||||
test("wrapCliConfigurationError - supported platform", (t) => {
|
||||
const commandError = new CommandInvocationError(
|
||||
"codeql",
|
||||
["version"],
|
||||
1,
|
||||
"Some error",
|
||||
for (const [platform, arch] of [
|
||||
["linux", "x64"],
|
||||
["linux", "arm64"],
|
||||
["win32", "x64"],
|
||||
["darwin", "x64"],
|
||||
["darwin", "arm64"],
|
||||
]) {
|
||||
test.serial(
|
||||
`wrapCliConfigurationError - ${platform}/${arch} supported`,
|
||||
(t) => {
|
||||
sinon.stub(process, "platform").value(platform);
|
||||
sinon.stub(process, "arch").value(arch);
|
||||
const commandError = new CommandInvocationError(
|
||||
"codeql",
|
||||
["version"],
|
||||
1,
|
||||
"Some error",
|
||||
);
|
||||
const cliError = new CliError(commandError);
|
||||
|
||||
const wrappedError = wrapCliConfigurationError(cliError);
|
||||
|
||||
// Should return the original error since the platform is supported, rather
|
||||
// than replacing it with the unsupported-platform ConfigurationError.
|
||||
t.is(wrappedError, cliError);
|
||||
},
|
||||
);
|
||||
const cliError = new CliError(commandError);
|
||||
|
||||
const wrappedError = wrapCliConfigurationError(cliError);
|
||||
|
||||
// Should return the original error since platform is supported
|
||||
t.is(wrappedError, cliError);
|
||||
});
|
||||
}
|
||||
|
||||
test("wrapCliConfigurationError - autobuild error", (t) => {
|
||||
const commandError = new CommandInvocationError(
|
||||
|
||||
Reference in New Issue
Block a user