CI patterns
Affected testing, sharding, JUnit, retries, and monorepo hooks for rusty test.
Affected packages only
# Local pre-push
rusty workspace affected origin/main
rusty test --affected origin/main
# Explicit package list (reviewable argv)
rusty workspace test-plan origin/main
# → # rusty test --affected origin/main
# → rusty test -p api -p worker …# illustrative CI
- name: Test affected crates
run: rusty test --affected origin/main -j 8 --reporter junit=junit.xmlPath-only (no reverse dependents):
rusty test --affected-direct origin/mainSharding
Shards partition the filtered unit plan with (index % n) + 1 == k (1-based k, stable for a fixed plan order).
# Matrix job 1 of 4
rusty test --workspace --shard 1/4 --reporter junit=junit-1.xmlCombine with --affected or -p as needed:
rusty test --affected origin/main --shard 2/3 --retries 1JUnit
rusty test --workspace --reporter junit=junit.xmlCovers passed runs, failed runs, and compile failures. Classname is the package name.
Retries
rusty test --retries 2Re-runs failed test binaries up to N extra times (not compile retries). Progress prints retry i/N between attempts.
Jobs and cache in CI
- Restore
$RUSTY_HOME/cache/and$RUSTY_HOME/store/from your cache backend. rusty fetch(offline-friendly after store restore).rusty test --affected origin/main -j 8— compile cache hits show ascache hit.- Optionally pin
RUSTY_JOBSinstead of-j.
Disable cache for debugging:
RUSTY_TEST_CACHE=0 rusty test -p broken-crateMore monorepo context
See Monorepo workflows and Workspace.