Skip to content

Commit 8e97feb

Browse files
committed
fix(ci): retain integration coverage for shared UI and harness changes
1 parent bff452a commit 8e97feb

3 files changed

Lines changed: 24 additions & 6 deletions

File tree

‎.github/CI.md‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,15 @@ A PR compares its merge base with the checked-out merge commit. Pushes and norma
99
| Independent SDK | That workspace's tests and type-check; no app build, services, or browsers |
1010
| App unit test | App test shards and test type check |
1111
| Integration test | Both provision paths; no HTTP/browser job merely for the test edit |
12-
| Workspace UI | Mobile and live Electron, plus app tests/build |
12+
| Workspace UI | Database integration, mobile and live Electron, plus app tests/build |
1313
| Landing content | SEO, app tests/build; no database integration or Electron |
1414
| Shared runtime or transitive dependency | All dependent boundaries |
1515
| One E2E harness | Its acceptance group and the shared production build |
1616

1717
The server boundary deliberately includes all API routes and backend domains. Shared modules and unclassified app source remain broad inputs: this is safer than pretending a route's static imports describe database, dynamic registry, or background-worker dependencies. Files read outside a package graph need explicit inputs: CLI acceptance imports `packages/sim-cli/src/embed.ts`, app tests read docs content, and live Electron and realtime acceptance cross app boundaries. When adding such a dependency, update the corresponding task inputs/dependencies and the real Git/Turbo selector scenarios.
1818

19+
Integration also depends on workspace UI because the desktop executor integration suite runs the production workspace stream dispatcher against PostgreSQL and Redis. Its explicit harness inputs include the database and realtime Vitest configs and integration setup files, which runtime tasks exclude.
20+
1921
`affectedTasks` already uses task inputs. Do not enable `futureFlags.affectedUsingTaskInputs` just for this planner: that flag also changes pruning, which can pull CI-only cross-app task dependencies into production Docker contexts.
2022

2123
Affected type-checks follow the package graph too; repository audits and lint always run. Workspace-only unit jobs use a free GitHub runner and do not start the app test shards.

‎apps/sim/turbo.json‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,15 +80,19 @@
8080
"outputs": []
8181
},
8282
"ci:integration": {
83-
"dependsOn": ["ci:server", "@sim/realtime#ci:runtime"],
83+
"dependsOn": ["ci:server", "ci:ui", "@sim/realtime#ci:runtime"],
8484
"inputs": [
8585
"**/*.integration.ts",
8686
"vitest.config.ts",
8787
"vitest.integration.setup.ts",
8888
"$TURBO_ROOT$/vitest.shared.ts",
8989
"$TURBO_ROOT$/vitest.integration-durations.json",
9090
"$TURBO_ROOT$/packages/db/**/*.integration.ts",
91-
"$TURBO_ROOT$/apps/realtime/**/*.integration.ts"
91+
"$TURBO_ROOT$/packages/db/vitest.config.ts",
92+
"$TURBO_ROOT$/packages/db/vitest.integration.setup.ts",
93+
"$TURBO_ROOT$/apps/realtime/**/*.integration.ts",
94+
"$TURBO_ROOT$/apps/realtime/vitest.config.ts",
95+
"$TURBO_ROOT$/apps/realtime/vitest.integration.setup.ts"
9296
],
9397
"cache": false
9498
},

‎scripts/ci-changes.test.ts‎

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,13 +139,15 @@ describe('CI task attribution through real Turborepo', () => {
139139
e2e_build: false,
140140
})
141141
})
142-
it('selects browser and Electron checks for workspace UI without server-only suites', () => {
143-
const plan = classifyFiles(['apps/sim/app/workspace/[workspaceId]/home/page.tsx'])
142+
it('selects integration and browser checks for workspace code shared with desktop execution', () => {
143+
const plan = classifyFiles([
144+
'apps/sim/app/workspace/[workspaceId]/home/hooks/stream/dispatch-stream-event.ts',
145+
])
144146
expect(plan.fallback).toBeUndefined()
145147
expect(groups(plan)).toEqual(['mobile'])
146148
expect(plan.flags).toMatchObject({
147149
desktop_live: true,
148-
integration: false,
150+
integration: true,
149151
test_app: true,
150152
build: true,
151153
e2e_build: true,
@@ -191,6 +193,16 @@ describe('CI task attribution through real Turborepo', () => {
191193
expect(groups(plan)).toEqual([])
192194
expect(plan.flags).toMatchObject({ integration: true, test_app: false, build: false })
193195
})
196+
it.each([
197+
'packages/db/vitest.config.ts',
198+
'packages/db/vitest.integration.setup.ts',
199+
'apps/realtime/vitest.config.ts',
200+
'apps/realtime/vitest.integration.setup.ts',
201+
])('runs integration checks when sibling collection or setup changes: %s', (file) => {
202+
const plan = classifyFiles([file])
203+
expect(plan.fallback).toBeUndefined()
204+
expect(plan.flags.integration).toBe(true)
205+
})
194206
it.each([
195207
['test-mobile-e2e.ts', 'mobile'],
196208
['test-project-file-sharing-e2e.ts', 'project-files'],

0 commit comments

Comments
 (0)