Files
oh-my-opencode/script/publish-workflow.test.ts
2026-04-08 13:40:38 +09:00

22 lines
632 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 pure bun test for workflows", () => {
for (const workflowPath of workflowPaths) {
// #given
const workflow = readFileSync(workflowPath, "utf8")
expect(workflow).toContain("- name: Run tests")
expect(workflow).toMatch(/run: bun (test|run script\/run-ci-tests\.ts)/)
}
})
})