ci(codex): run adapter checks across OS matrix
This commit is contained in:
@@ -6,6 +6,7 @@ import { fileURLToPath } from "node:url"
|
||||
const repositoryRoot = fileURLToPath(new URL("..", import.meta.url))
|
||||
const commandRoots = [".opencode/command", ".agents/command"] as const
|
||||
const skillRoots = [".opencode/skills", ".agents/skills"] as const
|
||||
const packDryRunTimeoutMs = 15_000
|
||||
|
||||
class PackDryRunError extends Error {
|
||||
constructor(readonly exitCode: number, readonly stderr: string) {
|
||||
@@ -130,5 +131,5 @@ describe("published package layout", () => {
|
||||
// then
|
||||
const missingPaths = expectedAssetPaths.filter((expectedPath) => !packedPaths.has(expectedPath))
|
||||
expect(missingPaths).toEqual([])
|
||||
})
|
||||
}, packDryRunTimeoutMs)
|
||||
})
|
||||
|
||||
@@ -3,9 +3,11 @@
|
||||
import { describe, expect, test } from "bun:test"
|
||||
import { readFileSync } from "node:fs"
|
||||
|
||||
const ciWorkflowPath = new URL("../.github/workflows/ci.yml", import.meta.url)
|
||||
|
||||
const workflowChecks = [
|
||||
{
|
||||
path: new URL("../.github/workflows/ci.yml", import.meta.url),
|
||||
path: ciWorkflowPath,
|
||||
testRuns: [
|
||||
"run: bun test",
|
||||
"run: bun test src/shared/dist-bundle-bun-globals.test.ts",
|
||||
@@ -28,4 +30,32 @@ describe("test workflows", () => {
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
test("exercise root checks across linux macos and windows", () => {
|
||||
// #given
|
||||
const workflow = readFileSync(ciWorkflowPath, "utf8")
|
||||
|
||||
// #when
|
||||
const hasCrossOsMatrix = workflow.includes("os: [ubuntu-latest, macos-latest, windows-latest]")
|
||||
const hasMatrixRunner = workflow.includes("runs-on: ${{ matrix.os }}")
|
||||
|
||||
// #then
|
||||
expect(hasCrossOsMatrix, "CI root checks must cover Linux, macOS, and Windows").toBe(true)
|
||||
expect(hasMatrixRunner, "CI root checks must run on the selected matrix OS").toBe(true)
|
||||
})
|
||||
|
||||
test("runs codex compatibility checks on every supported os", () => {
|
||||
// #given
|
||||
const workflow = readFileSync(ciWorkflowPath, "utf8")
|
||||
|
||||
// #when
|
||||
const hasCodexMatrixJob = workflow.includes("codex-compatibility:")
|
||||
const hasCodexCommand = workflow.includes("run: bun run test:codex")
|
||||
const buildNeedsCodexMatrix = workflow.includes("needs: [test, typecheck, codex-compatibility]")
|
||||
|
||||
// #then
|
||||
expect(hasCodexMatrixJob, "CI must expose a Codex compatibility matrix job").toBe(true)
|
||||
expect(hasCodexCommand, "Codex compatibility job must run the shared Codex test script").toBe(true)
|
||||
expect(buildNeedsCodexMatrix, "Build must wait for Codex compatibility checks").toBe(true)
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user