From 07e8e98814de572c42a9c394e810d1c08f3cecde Mon Sep 17 00:00:00 2001 From: maxpetrusenkoagent Date: Tue, 9 Jun 2026 16:45:59 -0400 Subject: [PATCH] test: guard Windows setup build workflow Add a regression test that keeps the Windows setup E2E workflow wired to the real bun run build path and the files that can regress the #1530 Bun shell crash. This is test-only so it can be pushed without workflow scope while still preventing accidental removal of the Windows build gate. --- test/windows-setup-e2e-workflow.test.ts | 47 +++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 test/windows-setup-e2e-workflow.test.ts diff --git a/test/windows-setup-e2e-workflow.test.ts b/test/windows-setup-e2e-workflow.test.ts new file mode 100644 index 000000000..5bdad245b --- /dev/null +++ b/test/windows-setup-e2e-workflow.test.ts @@ -0,0 +1,47 @@ +/** + * Windows Setup E2E workflow regression guard for #1530. + * + * The unit shell-compat test proves package.json no longer contains Bun-hostile + * subshell redirections. This workflow-level guard makes sure the Windows E2E + * job keeps exercising the actual install/build path that caught the original + * Windows Bun crash. + */ +import { describe, test, expect } from 'bun:test'; +import * as fs from 'node:fs'; +import * as path from 'node:path'; + +const WORKFLOW = path.resolve(import.meta.dir, '..', '.github', 'workflows', 'windows-setup-e2e.yml'); +const content = fs.readFileSync(WORKFLOW, 'utf-8'); + +describe('windows-setup-e2e.yml #1530 regression coverage', () => { + test('runs the real Windows build path that used to crash Bun', () => { + expect(content).toMatch(/runs-on:\s*windows-latest/); + expect(content).toContain('run: bun run build'); + expect(content).toContain('shell: bash'); + expect(content).toContain("GSTACK_SKIP_PLAYWRIGHT: '1'"); + }); + + test('is triggered by the files that can regress the Windows build chain', () => { + for (const triggerPath of [ + 'package.json', + 'scripts/build.sh', + 'scripts/write-version-files.sh', + 'setup', + '.github/workflows/windows-setup-e2e.yml', + ]) { + expect(content).toContain(`- '${triggerPath}'`); + } + }); + + test('verifies the build outputs that prove bun run build completed', () => { + expect(content).toContain('Verify binaries exist'); + for (const binary of [ + 'browse/dist/browse', + 'browse/dist/find-browse', + 'design/dist/design', + 'bin/gstack-global-discover', + ]) { + expect(content).toContain(binary); + } + }); +});