CI: gate Windows checks by windows-relevant scope (#32456)

* CI: add windows scope output for changed-scope

* Test: cover windows scope gating in changed-scope

* CI: gate checks-windows by windows scope

* Docs: update CI windows scope and runner label

* CI: move checks-windows to 32 vCPU runner

* Docs: align CI windows runner with workflow
This commit is contained in:
Vincent Koc
2026-03-02 19:10:58 -08:00
committed by GitHub
parent 80efcb75c7
commit 2c6616b830
4 changed files with 57 additions and 22 deletions

View File

@@ -1,5 +1,14 @@
import { describe, expect, it } from "vitest";
import { detectChangedScope } from "../../scripts/ci-changed-scope.mjs";
const require = createRequire(import.meta.url);
const { detectChangedScope } = require("../../scripts/ci-changed-scope.mjs") as {
detectChangedScope: (paths: string[]) => {
runNode: boolean;
runMacos: boolean;
runAndroid: boolean;
runWindows: boolean;
};
};
describe("detectChangedScope", () => {
it("fails safe when no paths are provided", () => {
@@ -7,6 +16,7 @@ describe("detectChangedScope", () => {
runNode: true,
runMacos: true,
runAndroid: true,
runWindows: true,
});
});
@@ -15,6 +25,7 @@ describe("detectChangedScope", () => {
runNode: false,
runMacos: false,
runAndroid: false,
runWindows: false,
});
});
@@ -23,6 +34,7 @@ describe("detectChangedScope", () => {
runNode: true,
runMacos: false,
runAndroid: false,
runWindows: true,
});
});
@@ -31,11 +43,13 @@ describe("detectChangedScope", () => {
runNode: false,
runMacos: true,
runAndroid: false,
runWindows: false,
});
expect(detectChangedScope(["apps/shared/OpenClawKit/Sources/Foo.swift"])).toEqual({
runNode: false,
runMacos: true,
runAndroid: true,
runWindows: false,
});
});
@@ -45,6 +59,7 @@ describe("detectChangedScope", () => {
runNode: false,
runMacos: false,
runAndroid: false,
runWindows: false,
},
);
});
@@ -54,12 +69,23 @@ describe("detectChangedScope", () => {
runNode: false,
runMacos: false,
runAndroid: false,
runWindows: false,
});
expect(detectChangedScope(["assets/icon.png"])).toEqual({
runNode: true,
runMacos: false,
runAndroid: false,
runWindows: false,
});
});
it("keeps windows lane off for non-runtime GitHub metadata files", () => {
expect(detectChangedScope([".github/labeler.yml"])).toEqual({
runNode: true,
runMacos: false,
runAndroid: false,
runWindows: false,
});
});
});