From 36bc881105fa43a0e1134eac32419bd6b9c70a49 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Thu, 13 Aug 2026 13:17:54 -0400 Subject: [PATCH 1/4] ci: fixes sync script to avoid grabbing old js files Signed-off-by: Vincent Biret --- .github/workflows/sync-dev-to-vX.Y-dev.yaml | 2 +- .github/workflows/sync-main-to-dev.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/sync-dev-to-vX.Y-dev.yaml b/.github/workflows/sync-dev-to-vX.Y-dev.yaml index 30077ae9fe..b1ca733abd 100644 --- a/.github/workflows/sync-dev-to-vX.Y-dev.yaml +++ b/.github/workflows/sync-dev-to-vX.Y-dev.yaml @@ -46,7 +46,7 @@ jobs: git checkout -b $SYNC origin/$SYNC || git checkout -b $SYNC origin/$BASE git merge origin/$HEAD -m "Merge $HEAD into $SYNC" git checkout origin/$BASE src/ - git checkout origin/$BASE tests/schema/ + git checkout origin/$BASE -- tests/schema/ ':*.mjs' git commit -m "Restored src/ and tests/schema/" || echo "" git push -u origin $SYNC diff --git a/.github/workflows/sync-main-to-dev.yaml b/.github/workflows/sync-main-to-dev.yaml index c6f9919a7d..7d62e30163 100644 --- a/.github/workflows/sync-main-to-dev.yaml +++ b/.github/workflows/sync-main-to-dev.yaml @@ -42,7 +42,7 @@ jobs: git checkout -b $SYNC origin/$SYNC || git checkout -b $SYNC origin/$BASE git merge origin/$HEAD -m "Merge $HEAD into $SYNC" git checkout origin/$BASE src/ - git checkout origin/$BASE tests/schema/ + git checkout origin/$BASE -- tests/schema/ ':*.mjs' git commit -m "Restored src/ and tests/schema/" || echo "" git push -u origin $SYNC From 1b028e26a094b5f7eb33f142a61c768d21dcf01a Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Thu, 13 Aug 2026 14:13:57 -0400 Subject: [PATCH 2/4] ci: negates path spec and neutralizes non-zero exit codes Signed-off-by: Vincent Biret --- .github/workflows/sync-dev-to-vX.Y-dev.yaml | 2 +- .github/workflows/sync-main-to-dev.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/sync-dev-to-vX.Y-dev.yaml b/.github/workflows/sync-dev-to-vX.Y-dev.yaml index b1ca733abd..1f36bd8252 100644 --- a/.github/workflows/sync-dev-to-vX.Y-dev.yaml +++ b/.github/workflows/sync-dev-to-vX.Y-dev.yaml @@ -46,7 +46,7 @@ jobs: git checkout -b $SYNC origin/$SYNC || git checkout -b $SYNC origin/$BASE git merge origin/$HEAD -m "Merge $HEAD into $SYNC" git checkout origin/$BASE src/ - git checkout origin/$BASE -- tests/schema/ ':*.mjs' + git checkout origin/$BASE -- tests/schema/ ':!*.mjs' || echo "" git commit -m "Restored src/ and tests/schema/" || echo "" git push -u origin $SYNC diff --git a/.github/workflows/sync-main-to-dev.yaml b/.github/workflows/sync-main-to-dev.yaml index 7d62e30163..6eac1e9aad 100644 --- a/.github/workflows/sync-main-to-dev.yaml +++ b/.github/workflows/sync-main-to-dev.yaml @@ -42,7 +42,7 @@ jobs: git checkout -b $SYNC origin/$SYNC || git checkout -b $SYNC origin/$BASE git merge origin/$HEAD -m "Merge $HEAD into $SYNC" git checkout origin/$BASE src/ - git checkout origin/$BASE -- tests/schema/ ':*.mjs' + git checkout origin/$BASE -- tests/schema/ ':!*.mjs' || echo "" git commit -m "Restored src/ and tests/schema/" || echo "" git push -u origin $SYNC From 33aa25cffaebf80a26ddce98ccc9ce2412217b49 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Thu, 13 Aug 2026 15:37:11 -0400 Subject: [PATCH 3/4] ci: adds comments Co-authored-by: Vincent Biret --- .github/workflows/sync-dev-to-vX.Y-dev.yaml | 2 ++ .github/workflows/sync-main-to-dev.yaml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/.github/workflows/sync-dev-to-vX.Y-dev.yaml b/.github/workflows/sync-dev-to-vX.Y-dev.yaml index 1f36bd8252..00179fa36b 100644 --- a/.github/workflows/sync-dev-to-vX.Y-dev.yaml +++ b/.github/workflows/sync-dev-to-vX.Y-dev.yaml @@ -46,6 +46,8 @@ jobs: git checkout -b $SYNC origin/$SYNC || git checkout -b $SYNC origin/$BASE git merge origin/$HEAD -m "Merge $HEAD into $SYNC" git checkout origin/$BASE src/ + # exclude mjs files because we want to sync from the head + # neutralizes non-zero exit code because an empty selection result returns 1 git checkout origin/$BASE -- tests/schema/ ':!*.mjs' || echo "" git commit -m "Restored src/ and tests/schema/" || echo "" git push -u origin $SYNC diff --git a/.github/workflows/sync-main-to-dev.yaml b/.github/workflows/sync-main-to-dev.yaml index 6eac1e9aad..732e9c4015 100644 --- a/.github/workflows/sync-main-to-dev.yaml +++ b/.github/workflows/sync-main-to-dev.yaml @@ -42,6 +42,8 @@ jobs: git checkout -b $SYNC origin/$SYNC || git checkout -b $SYNC origin/$BASE git merge origin/$HEAD -m "Merge $HEAD into $SYNC" git checkout origin/$BASE src/ + # exclude mjs files because we want to sync from the head + # neutralizes non-zero exit code because an empty selection result returns 1 git checkout origin/$BASE -- tests/schema/ ':!*.mjs' || echo "" git commit -m "Restored src/ and tests/schema/" || echo "" git push -u origin $SYNC From ebdc5d4f07eb6cecbf93778376b60cd6ad3ac8ff Mon Sep 17 00:00:00 2001 From: "Henry H. Andrews" Date: Thu, 13 Aug 2026 14:54:53 -0700 Subject: [PATCH 4/4] Use build-infra schema test helpers Co-authored-by: Codex --- tests/schema/schema.test.mjs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/schema/schema.test.mjs b/tests/schema/schema.test.mjs index e7b84f0a74..26befac4d3 100644 --- a/tests/schema/schema.test.mjs +++ b/tests/schema/schema.test.mjs @@ -1,7 +1,7 @@ import { readdirSync, readFileSync } from "node:fs"; import YAML from "yaml"; -import { describe, test, expect } from "vitest"; -import { registerSchema } from "@hyperjump/json-schema-coverage/vitest"; +import { describe, test, expect } from "@oai/build-infra/test"; +import { registerSchema, toMatchJsonSchema } from "@oai/build-infra/schema/vitest"; import registerOasSchema from "./oas-schema.mjs"; const parseYamlFromFile = (filePath) => { @@ -10,6 +10,7 @@ const parseYamlFromFile = (filePath) => { }; await registerOasSchema(); +expect.extend({ toMatchJsonSchema }); await registerSchema("./src/schemas/validation/schema.yaml"); const fixtures = './tests/schema';