History

fix(ci): cover cross-surface server test inputs

t3-code[bot] committed 2 months ago

Commit 25c2b2f1 parent a096eb82 files · +17 −1Browse files

Showing the changes to .github (2 of 2 files). Show all

Unified · Split

2 files
  1. .github/scripts/ci-change-classifier.cjs +6 −0
  2. .github/scripts/ci-change-classifier.test.cjs +11 −1
.github/scripts/ci-change-classifier.cjs+6−0
@@ -32,6 +32,11 @@ const SERVER_TEST_PACKAGE_ROOTS = [ · 31 unmodified lines
3232 "packages/shared/",
3333 "packages/tailscale/",
3434 ];
35+const SERVER_TEST_EXACT_INPUTS = new Set([
36+ "apps/mobile/src/lib/threadActivity.ts",
37+ "apps/web/src/lib/contextWindow.ts",
38+ "apps/web/src/session-logic.ts",
39+]);
3540 const MOBILE_NATIVE_EXACT_INPUTS = new Set([
3641 ".editorconfig",
3742 "apps/.editorconfig",
@@ -190,6 +195,7 @@ function isServerTestInput(file) { · 152 unmodified lines
190195 return false;
191196 }
192197 if (isWorkspaceNodeInput(file)) return true;
198+ if (SERVER_TEST_EXACT_INPUTS.has(file)) return true;
193199 if (file.startsWith("apps/server/") || file.startsWith("scripts/")) return true;
194200 if (SERVER_TEST_PACKAGE_ROOTS.some((root) => file.startsWith(root))) return true;
195201 if (
.github/scripts/ci-change-classifier.test.cjs+11−1
@@ -80,7 +80,17 @@ test("runs both node test groups for shared server dependencies", () => { · 79 unmodified lines
8080 }
8181 });
8282
83−test("keeps client-only packages off the server shards", () => {
83+test("runs server shards for cross-surface modules imported by server tests", () => {
84+ for (const file of [
85+ "apps/web/src/lib/contextWindow.ts",
86+ "apps/web/src/session-logic.ts",
87+ "apps/mobile/src/lib/threadActivity.ts",
88+ ]) {
89+ assert.equal(classifyChangedPaths([file]).testServer, true, file);
90+ }
91+});
92+
93+test("keeps unrelated client-only packages off the server shards", () => {
8494 for (const file of [
8595 "apps/desktop/src/main.ts",
8696 "apps/mobile/src/app.tsx",