ci: run pure bun test in workflows
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -46,8 +46,8 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
BUN_INSTALL_ALLOW_SCRIPTS: "@ast-grep/napi"
|
BUN_INSTALL_ALLOW_SCRIPTS: "@ast-grep/napi"
|
||||||
|
|
||||||
- name: Run tests with isolation
|
- name: Run tests
|
||||||
run: bun run script/run-ci-tests.ts
|
run: bun test
|
||||||
|
|
||||||
typecheck:
|
typecheck:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|||||||
@@ -45,8 +45,8 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
BUN_INSTALL_ALLOW_SCRIPTS: "@ast-grep/napi"
|
BUN_INSTALL_ALLOW_SCRIPTS: "@ast-grep/napi"
|
||||||
|
|
||||||
- name: Run tests with isolation
|
- name: Run tests
|
||||||
run: bun run script/run-ci-tests.ts
|
run: bun test
|
||||||
|
|
||||||
typecheck:
|
typecheck:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|||||||
@@ -9,14 +9,13 @@ const workflowPaths = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
describe("test workflows", () => {
|
describe("test workflows", () => {
|
||||||
test("use bun test isolation for workflows", () => {
|
test("use pure bun test for workflows", () => {
|
||||||
for (const workflowPath of workflowPaths) {
|
for (const workflowPath of workflowPaths) {
|
||||||
// #given
|
// #given
|
||||||
const workflow = readFileSync(workflowPath, "utf8")
|
const workflow = readFileSync(workflowPath, "utf8")
|
||||||
|
|
||||||
// #then - should use run-ci-tests.ts for mock isolation
|
|
||||||
expect(workflow).toContain("- name: Run tests")
|
expect(workflow).toContain("- name: Run tests")
|
||||||
expect(workflow).toContain("run-ci-tests.ts")
|
expect(workflow).toContain("run: bun test")
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user