ci: faster Test Core — affected-only PR tests, single spec suite run#2925
Merged
Conversation
- Add workflow-level concurrency (cancel superseded runs), mirroring objectui. - PRs now run 'turbo run test --affected' against the PR base instead of the full 75-package matrix; spec-rooted PRs still fan out to dependents. - Push runs exclude @objectstack/spec from the plain test pass: the coverage step already executes the identical 250-file suite once with coverage. Previously every push ran the whole spec suite twice. Coverage generation and its artifact upload are now push-only. - Drop no-op 'vitest run --passWithNoTests' test scripts from the three packages with zero test files (account, setup, studio) so turbo skips them instead of booting vitest for nothing. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0128mspMLGhBrCzww6jmVUaR
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
📓 Docs Drift CheckThis PR changes 1 package(s): 2 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:
|
os-zhuang
marked this pull request as ready for review
July 14, 2026 15:41
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Test Core is the CI critical path at ~12 min per run (
turbo run testalone is 10m20s; a recent main run executed 129 tasks with only 3 turbo cache hits). Log analysis of run 29339722865 showed two structural wastes:@objectstack/specsuite runs twice per run — once insideturbo run test(~53 s), then again in full undertest:coverage(~38 s) just to collect coverage for*.zod.ts.What
turbo run test --affected(withTURBO_SCM_BASEpinned to the PR base SHA, checkout atfetch-depth: 0). Spec-touching PRs still fan out to (almost) everything since spec is the graph root; PRs that don't touch spec skip the bulk of the matrix. Verified locally: this PR's own diff resolves to 9 affected test tasks instead of 75.@objectstack/specis excluded from the plain test pass — the coverage step executes the identical suite once, with coverage. Coverage generation + artifact upload are now push-only (they previously also ran on PRs).packages/apps/{account,setup,studio}have zero test files but each booted avitest run --passWithNoTestsprocess every run. Verified turbo treats the missing script as<NONEXISTENT>and skips it.Expected effect
Push runs: ~1 min faster (single spec pass + no vitest no-op boots). Non-spec PRs: several minutes faster depending on the affected subgraph. No test is deleted or weakened — PR coverage collection moves to push-only, which matches how objectui already gates Codecov.
Not in this PR (follow-ups from the CI-time evaluation)
bootStackacross dogfood suites (44 full-stack boots dominate the 7-min Dogfood job).objectstack verify --rls+ unit-layer RLS tests.example-showcase:test(141 s, import-dominated) off the Test Core critical path.🤖 Generated with Claude Code
https://claude.ai/code/session_0128mspMLGhBrCzww6jmVUaR
Generated by Claude Code