diff --git a/.github/workflows/pr_checks.yml b/.github/workflows/pr_checks.yml index 5f18537b2..06989134e 100644 --- a/.github/workflows/pr_checks.yml +++ b/.github/workflows/pr_checks.yml @@ -27,6 +27,9 @@ jobs: - name: Install dependencies run: npm ci + - name: Build + run: npm run build + - name: Run tests run: npm test env: @@ -50,9 +53,6 @@ jobs: - name: Run linting run: npm run lint - - name: Build - run: npm run build - # GitHub does not have a way of requiring that all checks pass (you must manually select each job) # This action at least lets us manage the list of required tests via source control # so that creators of new jobs can add them to this list diff --git a/src/test-helpers/cli-helpers.ts b/src/test-helpers/cli-helpers.ts index 74bdb5ece..1bfd02fdf 100644 --- a/src/test-helpers/cli-helpers.ts +++ b/src/test-helpers/cli-helpers.ts @@ -66,6 +66,17 @@ export async function runCLI( expectError = false, } = options; + // Windows CI diagnostics + if (process.platform === "win32" && process.env.CI) { + console.log("Windows CI Diagnostics:"); + console.log("- CLI Path:", context.cliPath); + console.log("- Absolute CLI Path:", path.resolve(context.cliPath)); + console.log("- File exists:", await fs.access(context.cliPath).then(() => true).catch(() => false)); + console.log("- Working dir:", context.testDir); + console.log("- Node version:", process.version); + console.log("- Process platform:", process.platform); + } + const execOptions = { cwd: context.testDir, env: { @@ -93,6 +104,15 @@ export async function runCLI( }; try { + // On Windows CI, log the actual command being executed + if (process.platform === "win32" && process.env.CI) { + console.log("Executing command:", { + node: process.execPath, + script: context.cliPath, + args: args, + }); + } + const result = await execaNode(context.cliPath, args, execOptions); // Ensure stdout/stderr are always strings