Skip to content

Commit efb9f8c

Browse files
committed
fix(ci): preserve landing dependencies and favor integration latency
1 parent 8e97feb commit efb9f8c

4 files changed

Lines changed: 21 additions & 8 deletions

File tree

‎.github/CI.md‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ 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 | Database integration, mobile and live Electron, plus app tests/build |
12+
| Workspace UI | Database integration, mobile, SEO 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 |
@@ -18,11 +18,15 @@ The server boundary deliberately includes all API routes and backend domains. Sh
1818

1919
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.
2020

21+
SEO depends on workspace UI and server code: landing pages reuse workspace pricing and preview components, provider models/pricing, and the block registry. These directory boundaries are not isolated application dependency graphs.
22+
2123
`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.
2224

2325
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.
2426

25-
Lightweight HTTP suites and database integration run on free standard GitHub runners. Memory-heavy builds and browser jobs retain appropriately sized Blacksmith runners. Electron uses 4-vCPU Blacksmith: both shards passed within 14 seconds of the 8-vCPU control; the free GitHub rest shard was slower and its lease run stalled.
27+
Lightweight HTTP suites run on free standard GitHub runners. Database integration uses 2-vCPU Blacksmith: a same-source comparison of all 16 jobs had a slowest shard of 6m 04s versus 6m 55s on free GitHub, with identical coverage. The existing `CI_PROVIDER` switch retains that tested GitHub fallback; provider changes also select the matching cache setup. This is one paired sample, not a long-run percentile estimate.
28+
29+
Memory-heavy builds and browser jobs retain appropriately sized Blacksmith runners. Electron uses 4-vCPU Blacksmith: both shards passed within 14 seconds of the 8-vCPU control; the free GitHub rest shard was slower and its lease run stalled.
2630

2731
Every HTTP and browser group consumes the same production build in an isolated job/database. Electron also uses that build and skips its development-route warm-up. Local HTTP and Electron development runs retain their dev-server behavior. Build inputs exclude test-only files so a harness edit can reuse an unchanged production build.
2832

‎.github/workflows/checks.yml‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,12 @@ jobs:
7171
# The two paths build different schemas (migrations add triggers, checks and NOT VALID
7272
# constraints that `db:push` does not), so each runs the whole suite. Vitest splits each
7373
# suite's files across eight shards by measured duration (DurationBalancedSequencer in vitest.shared.ts); a
74-
# shard runs its files one at a time against its own database. Standard GitHub runners are
75-
# free for this public repository and have enough memory for the app, Postgres and Redis.
74+
# shard runs its files one at a time against its own database. Blacksmith keeps the critical
75+
# integration path fast; standard GitHub runners retain a free, validated fallback.
7676
name: integration (${{ matrix.provision }}, ${{ matrix.shard }}/8)
7777
needs: changes
7878
if: needs.changes.outputs.integration == 'true'
79-
runs-on: ubuntu-24.04
79+
runs-on: ${{ (vars.CI_PROVIDER == '' || vars.CI_PROVIDER == 'blacksmith') && 'blacksmith-2vcpu-ubuntu-2404' || 'ubuntu-24.04' }}
8080
timeout-minutes: 20
8181
strategy:
8282
fail-fast: false
@@ -135,7 +135,7 @@ jobs:
135135
- name: Setup workspace
136136
uses: ./.github/actions/setup
137137
with:
138-
provider: github
138+
provider: ${{ vars.CI_PROVIDER }}
139139

140140
- name: Provision a fresh database through the supported command
141141
working-directory: packages/db

‎apps/sim/turbo.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@
131131
"cache": false
132132
},
133133
"ci:e2e-seo": {
134-
"dependsOn": ["ci:shared"],
134+
"dependsOn": ["ci:server", "ci:ui"],
135135
"inputs": ["app/(landing)/**", "content/**", "scripts/test-landing-seo-e2e.ts"],
136136
"cache": false
137137
},

‎scripts/ci-changes.test.ts‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ describe('CI task attribution through real Turborepo', () => {
144144
'apps/sim/app/workspace/[workspaceId]/home/hooks/stream/dispatch-stream-event.ts',
145145
])
146146
expect(plan.fallback).toBeUndefined()
147-
expect(groups(plan)).toEqual(['mobile'])
147+
expect(groups(plan)).toEqual(['mobile', 'seo'])
148148
expect(plan.flags).toMatchObject({
149149
desktop_live: true,
150150
integration: true,
@@ -164,6 +164,15 @@ describe('CI task attribution through real Turborepo', () => {
164164
build: true,
165165
})
166166
})
167+
it.each([
168+
'apps/sim/app/workspace/[workspaceId]/upgrade/components/comparison-table/comparison-data.ts',
169+
'apps/sim/providers/models.ts',
170+
'apps/sim/blocks/registry.ts',
171+
])('runs SEO when landing pages consume changed workspace or backend code: %s', (file) => {
172+
const plan = classifyFiles([file])
173+
expect(plan.fallback).toBeUndefined()
174+
expect(groups(plan)).toContain('seo')
175+
})
167176
it('preserves the implicit app test dependency on docs content', () => {
168177
const plan = classifyFiles(['apps/docs/content/docs/integrations/netsuite.mdx'])
169178
expect(plan.fallback).toBeUndefined()

0 commit comments

Comments
 (0)