2c081e1999
Running Linux CI in one Bun process still leaks mock.module registrations across files, so the workflows now use a CI-specific test runner that isolates mock-heavy targets before executing the remaining suite together. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
23 lines
633 B
TypeScript
23 lines
633 B
TypeScript
/// <reference types="bun-types" />
|
|
|
|
import { describe, expect, test } from "bun:test"
|
|
import { readFileSync } from "node:fs"
|
|
|
|
const workflowPaths = [
|
|
new URL("../.github/workflows/ci.yml", import.meta.url),
|
|
new URL("../.github/workflows/publish.yml", import.meta.url),
|
|
]
|
|
|
|
describe("test workflows", () => {
|
|
test("use the CI-safe test runner for workflows", () => {
|
|
for (const workflowPath of workflowPaths) {
|
|
// given
|
|
const workflow = readFileSync(workflowPath, "utf8")
|
|
|
|
// then
|
|
expect(workflow).toContain("- name: Run tests")
|
|
expect(workflow).toContain("run: bun run test:ci")
|
|
}
|
|
})
|
|
})
|