From 025009006c2a789de3f2489acec55e71c8153b5f Mon Sep 17 00:00:00 2001 From: Paolo Tranquilli Date: Fri, 28 Aug 2026 17:28:29 +0200 Subject: [PATCH] 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 --- .github/workflows/__linux-arm64.yml | 1 - pr-checks/checks/linux-arm64.yml | 1 - src/cli-errors.test.ts | 40 +++++++++++++++++++---------- 3 files changed, 27 insertions(+), 15 deletions(-) diff --git a/.github/workflows/__linux-arm64.yml b/.github/workflows/__linux-arm64.yml index 641099ebc..a1764426d 100644 --- a/.github/workflows/__linux-arm64.yml +++ b/.github/workflows/__linux-arm64.yml @@ -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: | diff --git a/pr-checks/checks/linux-arm64.yml b/pr-checks/checks/linux-arm64.yml index d254799ba..94e03da17 100644 --- a/pr-checks/checks/linux-arm64.yml +++ b/pr-checks/checks/linux-arm64.yml @@ -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: | diff --git a/src/cli-errors.test.ts b/src/cli-errors.test.ts index 1a83def51..bb0e1b5d9 100644 --- a/src/cli-errors.test.ts +++ b/src/cli-errors.test.ts @@ -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(