ReviewOS

zig-utils/zig-test-framework

Add deterministic test sharding for distributed CI

#4
Closed glennmichael123 opened this 9 days ago ·
9 days ago

Motivation

Large test suites should be distributable across multiple CI workers without maintaining separate file lists.

Proposed work

  • Add shard index and total shard count options.
  • Use a deterministic assignment based on normalized test identity.
  • Support file-level sharding initially and document whether test-level sharding is possible.
  • Print shard selection and totals in summaries.
  • Combine cleanly with filtering, random seeds, retries, and coverage.

Acceptance criteria

  • The union of all shards contains every selected test exactly once.
  • The same inputs always produce the same shard assignment.
  • Invalid shard parameters fail with clear messages.
  • CI documentation includes a matrix example.

Sign in to comment on this issue.