mirror of https://github.com/garrytan/gstack.git
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.
This commit is contained in:
parent
cab774cced
commit
07e8e98814
|
|
@ -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);
|
||||
}
|
||||
});
|
||||
});
|
||||
Loading…
Reference in New Issue