Skip to content

Commit 2880f9a

Browse files
committed
Shard the src CI leg into three balanced matrix legs
The single test (src) leg ran ~92s warm and set the CI wall clock. Three path-disjoint shards (tui; agent+subagent; everything else) run ~30/46/45s locally, and a test (src) dummy preserves the required check name once every leg passes.
1 parent 3855ccc commit 2880f9a

1 file changed

Lines changed: 23 additions & 4 deletions

File tree

.github/workflows/ci.yml

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,19 +78,28 @@ jobs:
7878
run: bun run build
7979

8080
# The suite is sharded so the slowest slice, not the whole suite, sets the
81-
# wall clock. Every shard still goes through check:projects-dir-guard: the
81+
# wall clock. The old ./src leg (387 files, ~88s local) is split into three
82+
# path-disjoint shards measured at ~30s (src-a: tui, 146 files), ~46s
83+
# (src-b: agent + subagent, 90 files), and ~45s (src-c: everything else in
84+
# src, 153 files); the ./tests leg stays whole because ./evals ./scripts
85+
# finish in ~1s and a leg of their own would be all setup overhead.
86+
# Every shard still goes through check:projects-dir-guard: the
8287
# guard forwards these path filters to the suite it wraps, and the union of
8388
# the shards' filters is exactly ./src ./tests ./evals ./scripts, so the gate covers
8489
# the same tests as before, all of them sandboxed.
8590
test:
8691
runs-on: ubuntu-latest
8792
strategy:
88-
# A red shard must not cancel the other; both results are the signal.
93+
# A red shard must not cancel the others; every result is the signal.
8994
fail-fast: false
9095
matrix:
9196
shard:
92-
- name: src
93-
paths: ./src
97+
- name: src-a
98+
paths: ./src/tui
99+
- name: src-b
100+
paths: ./src/agent ./src/subagent
101+
- name: src-c
102+
paths: ./src/auth ./src/changelog ./src/config ./src/cost ./src/crash ./src/logging ./src/mcp ./src/perf ./src/permission ./src/plugins ./src/provider ./src/session ./src/shell ./src/telemetry ./src/tools ./src/trust ./src/upgrade ./src/util ./src/web ./src/config.test.ts ./src/context-compactor.test.ts ./src/director.test.ts ./src/inference-abort.test.ts ./src/inference-error-message.test.ts ./src/inference-gateway-error.test.ts ./src/list-dir.test.ts ./src/pricing-fetcher.test.ts ./src/pricing-metadata.test.ts ./src/profiles.test.ts ./src/prompts.test.ts ./src/renderer.test.ts ./src/settings.test.ts ./src/state.test.ts
94103
- name: tests-evals-and-scripts
95104
paths: ./tests ./evals ./scripts
96105
name: test (${{ matrix.shard.name }})
@@ -161,3 +170,13 @@ jobs:
161170
runs-on: ubuntu-latest
162171
steps:
163172
- run: "true"
173+
174+
# The src-a/src-b/src-c matrix legs replaced the single test (src) leg, so
175+
# this publishes that context name once all legs pass. needs: test waits for
176+
# every matrix leg; a red leg skips this instead of greening it.
177+
test-src:
178+
name: test (src)
179+
needs: test
180+
runs-on: ubuntu-latest
181+
steps:
182+
- run: "true"

0 commit comments

Comments
 (0)