Skip to content

Commit f3bbc60

Browse files
committed
test(ci): pin Cross-platform timeout ownership per job
Global timeout-minutes counts still passed if 30 and 8 were swapped between test and npm-global-smoke.
1 parent 56d1f8d commit f3bbc60

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

tests/ci-workflows.test.ts

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,16 @@ function count(text: string, fragment: string): number {
3030
describe("GitHub Actions hardening", () => {
3131
test("cross-platform CI keeps bounded jobs and immutable action references", async () => {
3232
const workflow = await readText(".github/workflows/ci.yml");
33+
const ci = Bun.YAML.parse(workflow) as {
34+
jobs?: Record<string, { "timeout-minutes"?: number } | undefined>;
35+
};
3336

34-
// The cross-platform `test` job sits at 30 minutes after the 2026-08-01
35-
// state-store merge pushed Windows past the prior 20m kill on #827. Do not
36-
// raise again — hung tests (e.g. unref'd oauth waitMs) must be fixed, not
37-
// absorbed. `npm-global-smoke` stays at 8.
38-
expect(count(workflow, "timeout-minutes: 30")).toBe(1);
39-
expect(count(workflow, "timeout-minutes: 8")).toBe(1);
37+
// Job-scoped: a global count of "30" and "8" still passes if the values are
38+
// swapped between `test` and `npm-global-smoke`. Pin ownership explicitly.
39+
// Do not raise `test` again — hung tests (e.g. unref'd oauth waitMs) must
40+
// be fixed, not absorbed by a larger ceiling.
41+
expect(ci.jobs?.test?.["timeout-minutes"]).toBe(30);
42+
expect(ci.jobs?.["npm-global-smoke"]?.["timeout-minutes"]).toBe(8);
4043
// Both jobs must stay bounded — an unbounded job can hang a queue for hours.
4144
expect(count(workflow, "timeout-minutes:")).toBe(2);
4245
expect(workflow).toContain("actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0");

0 commit comments

Comments
 (0)