Showing the changes to .github (2 of 2 files). Show all
Unified · Split
| @@ -32,6 +32,11 @@ const SERVER_TEST_PACKAGE_ROOTS = [ · 31 unmodified lines | |||
| 32 | "packages/shared/", | 32 | "packages/shared/", |
| 33 | "packages/tailscale/", | 33 | "packages/tailscale/", |
| 34 | ]; | 34 | ]; |
| 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 | ]); | ||
| 35 | const MOBILE_NATIVE_EXACT_INPUTS = new Set([ | 40 | const MOBILE_NATIVE_EXACT_INPUTS = new Set([ |
| 36 | ".editorconfig", | 41 | ".editorconfig", |
| 37 | "apps/.editorconfig", | 42 | "apps/.editorconfig", |
| @@ -190,6 +195,7 @@ function isServerTestInput(file) { · 152 unmodified lines | |||
| 190 | return false; | 195 | return false; |
| 191 | } | 196 | } |
| 192 | if (isWorkspaceNodeInput(file)) return true; | 197 | if (isWorkspaceNodeInput(file)) return true; |
| 198 | if (SERVER_TEST_EXACT_INPUTS.has(file)) return true; | ||
| 193 | if (file.startsWith("apps/server/") || file.startsWith("scripts/")) return true; | 199 | if (file.startsWith("apps/server/") || file.startsWith("scripts/")) return true; |
| 194 | if (SERVER_TEST_PACKAGE_ROOTS.some((root) => file.startsWith(root))) return true; | 200 | if (SERVER_TEST_PACKAGE_ROOTS.some((root) => file.startsWith(root))) return true; |
| 195 | if ( | 201 | if ( |
| @@ -80,7 +80,17 @@ test("runs both node test groups for shared server dependencies", () => { · 79 unmodified lines | |||
| 80 | } | 80 | } |
| 81 | }); | 81 | }); |
| 82 | 82 | ||
| 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", () => { | ||
| 84 | for (const file of [ | 94 | for (const file of [ |
| 85 | "apps/desktop/src/main.ts", | 95 | "apps/desktop/src/main.ts", |
| 86 | "apps/mobile/src/app.tsx", | 96 | "apps/mobile/src/app.tsx", |