Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 5 additions & 9 deletions .github/workflows/node-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
shard: [1, 2, 3]
shard: [1, 2]
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
Expand Down Expand Up @@ -255,7 +255,7 @@ jobs:
TMP: ${{ runner.temp }}
TMPDIR: ${{ runner.temp }}
CODEX_SECURITY_ALLOW_MACHINE_POLICY_TEST: "false"
run: node scripts/run-ci-tests.mjs ${{ matrix.shard }}/3 ${{ matrix.os == 'ubuntu-latest' && '--coverage --coverage-reporter=text --coverage-reporter=lcov' || '' }}
run: node scripts/run-ci-tests.mjs ${{ matrix.shard }}/2 ${{ matrix.os == 'ubuntu-latest' && '--coverage --coverage-reporter=text --coverage-reporter=lcov' || '' }}
- name: Upload test reports
if: always()
continue-on-error: true
Expand Down Expand Up @@ -431,7 +431,7 @@ jobs:
strategy:
fail-fast: false
matrix:
shard: [1, 2, 3, 4, 5, 6, 7]
shard: [1, 2, 3, 4, 5, 6]
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
Expand Down Expand Up @@ -470,7 +470,7 @@ jobs:
TMP: ${{ steps.windows-temp.outputs.path }}
TMPDIR: ${{ steps.windows-temp.outputs.path }}
CODEX_SECURITY_ALLOW_MACHINE_POLICY_TEST: "false"
run: node sdk/typescript/scripts/run-ci-tests.mjs ${{ matrix.shard }}/7
run: node sdk/typescript/scripts/run-ci-tests.mjs ${{ matrix.shard }}/6
- name: Upload Windows test reports
if: always()
continue-on-error: true
Expand Down Expand Up @@ -524,14 +524,10 @@ jobs:
run: node scripts/check-package.mjs ../../dist/*.tgz

windows:
name: windows-latest / node-${{ matrix.node == '22.13.0' && '22' || matrix.node }}
name: windows-latest / node-22
runs-on: ubuntu-latest
if: always()
needs: [validate-title, static-checks, windows-test, windows-verify]
strategy:
fail-fast: false
matrix:
node: ["22.13.0", "24"]
steps:
- name: Require every Windows coverage job
if: needs.validate-title.result != 'success' || (needs.validate-title.outputs.ci-mode == 'full' && (needs.static-checks.result != 'success' || needs.windows-test.result != 'success' || needs.windows-verify.result != 'success')) || (needs.validate-title.outputs.ci-mode != 'full' && needs.validate-title.outputs.ci-mode != 'markdown')
Expand Down
8 changes: 4 additions & 4 deletions sdk/typescript/TESTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ Typechecking and formatting run once in an independent required job, so package
consumers do not wait for those checks. Package compilation and archive
validation still finish before the test jobs start.

The full Bun suite runs once per OS under Node 22: three file shards on Linux
and macOS, and seven on Windows. The other Node versions run the installed
The full Bun suite runs once per OS under Node 22: two file shards on Linux
and macOS, and six on Windows. The other Node versions run the installed
package checks instead of repeating the same Bun suite. MCP and Python tests
run in separate required jobs. Python uses four isolated pytest-xdist workers
with work stealing; worker crashes fail the run without automatic restarts.
Expand All @@ -106,8 +106,8 @@ with work stealing; worker crashes fail the run without automatic restarts.
Every new test file is included automatically with a one-second estimate.
Refresh those estimates from the uploaded reports when adding or splitting
expensive files; estimates affect scheduling, never whether a test runs.
To reproduce one Windows shard locally after building the plugin, run
`node scripts/run-ci-tests.mjs 3/7 --seed=12345`.
To reproduce one shard on Windows after building the plugin, run
`node scripts/run-ci-tests.mjs 3/6 --seed=12345`.

Every Bun lane uploads JUnit; Linux lanes also upload LCOV per shard. Python
reports include case durations, and the MCP runner can upload its JUnit report.
Expand Down
16 changes: 2 additions & 14 deletions sdk/typescript/tests-ts/release-automation.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4021,25 +4021,13 @@ describe("GitHub release workflow safeguards", () => {
expect(workflow.jobs[gate]?.steps[0]?.run).toBe("exit 1");
}

const renderName = (template: string, values: Record<string, string>) => {
let name = template;
for (const [key, value] of Object.entries(values)) {
name = name.replaceAll("${{ matrix." + key + " }}", value);
}
return name.replace(
"${{ matrix.node == '22.13.0' && '22' || matrix.node }}",
values["node"] === "22.13.0" ? "22" : values["node"] ?? "",
);
};
const unixJob = workflow.jobs["required-test"];
const windowsJob = workflow.jobs["windows"];
const fullNames = [
...(unixJob?.strategy?.matrix["os"] ?? []).map((os) =>
renderName(unixJob?.name ?? "", { os }),
),
...(windowsJob?.strategy?.matrix["node"] ?? []).map((node) =>
renderName(windowsJob?.name ?? "", { node }),
(unixJob?.name ?? "").replace("${{ matrix.os }}", os),
),
windowsJob?.name ?? "",
];
const requiredContexts = new Set([
"ubuntu-latest / node-22",
Expand Down
6 changes: 3 additions & 3 deletions sdk/typescript/tests-ts/skeleton.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,15 +105,15 @@ describe("TypeScript package skeleton", () => {
const { jobs } = await workflow("node-ci.yml");
expect(jobs["test"]?.strategy?.matrix).toEqual({
os: ["ubuntu-latest", "macos-latest"],
shard: [1, 2, 3],
shard: [1, 2],
});
expect(jobs["compatibility"]?.strategy?.matrix).toEqual({
os: ["ubuntu-latest"],
node: ["22.13.0", "24.0.0", "24", "26.0.0", "26"],
include: [{ os: "macos-latest", node: "22.13.0" }],
});
expect(jobs["windows-test"]?.strategy?.matrix).toEqual({
shard: [1, 2, 3, 4, 5, 6, 7],
shard: [1, 2, 3, 4, 5, 6],
});
expect(jobs["windows-verify"]?.strategy?.matrix["node"]).toEqual([
"22.13.0",
Expand Down Expand Up @@ -162,7 +162,7 @@ describe("TypeScript package skeleton", () => {
expect(packageJson.scripts["test:ci"]).toContain("pnpm run test ");
expect(jobs["windows-test"]?.steps).toContainEqual(
expect.objectContaining({
run: "node sdk/typescript/scripts/run-ci-tests.mjs ${{ matrix.shard }}/7",
run: "node sdk/typescript/scripts/run-ci-tests.mjs ${{ matrix.shard }}/6",
}),
);
});
Expand Down
Loading