mirror of
https://github.com/openai/codex-security.git
synced 2026-11-25 17:21:08 +08:00
ci: spread campaign recovery checks across Windows shards
This commit is contained in:
@@ -507,7 +507,7 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
shard: [1, 2, 3, 4, 5, 6, 7]
|
||||
shard: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
|
||||
steps:
|
||||
- *checkout-repository
|
||||
- &set-up-python
|
||||
@@ -540,7 +540,7 @@ jobs:
|
||||
TMP: ${{ steps.windows-temp.outputs.path }}
|
||||
TMPDIR: ${{ steps.windows-temp.outputs.path }}
|
||||
CODEX_SECURITY_ALLOW_MACHINE_POLICY_TEST: "false"
|
||||
run: node --experimental-strip-types sdk/typescript/scripts/run-ci-tests.mts ${{ matrix.shard }}/7 --seed=${{ github.run_number }}
|
||||
run: node --experimental-strip-types sdk/typescript/scripts/run-ci-tests.mts ${{ matrix.shard }}/11 --seed=${{ github.run_number }}
|
||||
- name: Upload Windows test reports
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
|
||||
@@ -120,7 +120,7 @@ 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
|
||||
and macOS, and eleven 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.
|
||||
@@ -130,7 +130,7 @@ inventory to Bun's native `--shard` option. Bun sorts the file paths and assigns
|
||||
them round-robin across the shards. New files are included automatically;
|
||||
there is no timing table to update when adding or splitting tests.
|
||||
To reproduce one Windows shard locally after building the plugin, run
|
||||
`node --experimental-strip-types scripts/run-ci-tests.mts 3/7 --seed=12345`.
|
||||
`node --experimental-strip-types scripts/run-ci-tests.mts 3/11 --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.
|
||||
|
||||
@@ -147,7 +147,7 @@ describe("TypeScript package skeleton", () => {
|
||||
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, 7, 8, 9, 10, 11],
|
||||
});
|
||||
expect(jobs["windows-verify"]?.strategy?.matrix["node"]).toEqual([
|
||||
"22.13.0",
|
||||
@@ -304,7 +304,7 @@ describe("TypeScript package skeleton", () => {
|
||||
expect(packageJson.scripts["test:ci"]).toContain("pnpm run test ");
|
||||
expect(jobs["windows-test"]?.steps).toContainEqual(
|
||||
expect.objectContaining({
|
||||
run: "node --experimental-strip-types sdk/typescript/scripts/run-ci-tests.mts ${{ matrix.shard }}/7 --seed=${{ github.run_number }}",
|
||||
run: "node --experimental-strip-types sdk/typescript/scripts/run-ci-tests.mts ${{ matrix.shard }}/11 --seed=${{ github.run_number }}",
|
||||
}),
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user