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:
Paolo Tranquilli
2026-08-28 17:28:29 +02:00
parent 6441b26a49
commit 025009006c
3 changed files with 27 additions and 15 deletions

View File

@@ -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: |

View File

@@ -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: |

View File

@@ -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(