Description
Implement test sharding infrastructure that splits the test suite across parallel CI workers, reducing total CI runtime while ensuring deterministic, conflict-free test execution.
Requirements and Context
- Testing: Configure Vitest sharding across the monorepo
- Coverage: Affects the root
vitest.config.ts and per-app configs
- Documentation: Document the CI sharding strategy
Suggested Execution
Branch: test/issue-042-test-sharding-ci-optimization
Implement Changes
- Configure Vitest
--shard support in the root and per-app test configs
- Add CI matrix configuration to run shards in parallel
- Ensure tests do not share mutable global state that would break under sharding
- Document the sharding strategy and shard count rationale
Test and Commit
- Tests must pass identically whether sharded or run as a single suite
- CI runtime must measurably decrease with sharding
- Document the sharding configuration
Example Commit Message
test(ci): implement parallelized test sharding for pipeline optimization
- Configure Vitest shard support across monorepo
- Add parallel CI matrix for shard execution
- Document sharding strategy and shard count
Guidelines
- Ensure no test relies on shared global mutable state
- Balance shards by execution time, not file count
- Verify sharded results aggregate correctly
Description
Implement test sharding infrastructure that splits the test suite across parallel CI workers, reducing total CI runtime while ensuring deterministic, conflict-free test execution.
Requirements and Context
vitest.config.tsand per-app configsSuggested Execution
Branch:
test/issue-042-test-sharding-ci-optimizationImplement Changes
--shardsupport in the root and per-app test configsTest and Commit
Example Commit Message
Guidelines