SafeDisk AI

Cargo Test Workspace No Space Left On Device In GitHub Actions

When cargo test --workspace fills a GitHub-hosted runner, the fix is rarely a blind rm -rf target. Measure which workspace members, profiles, Docker testcontainers, Trunk or wasm builds, and incremental artifacts create the peak disk footprint, then split the job around those peaks.

CI deletion judgment

Find what the runner can delete.

Leave your email now; the scan summary or failing job link can follow after the first reply. We send the free SafeDisk AI deletion trial step only if deletion risk is still unclear.

Run free GitHub Action

Add command output optional

Free trial step. We reply first with a delete / confirm / protect judgment or one read-only detail we still need.

See sample result Ask AI about one file
Copy-ready issue reply

Use this before deciding whether to shard, clean, or cache differently.

Paste this into a Rust CI issue to capture evidence without changing the workflow yet.

Before splitting or deleting caches, capture the peak disk buckets from the failing Rust job:

df -h
du -sh target ~/.cargo/registry ~/.cargo/git /tmp 2>/dev/null || true
find target -mindepth 1 -maxdepth 3 -type d -exec du -sh {} + 2>/dev/null | sort -hr | head -40
docker system df -v 2>/dev/null || true

Then split by peak producer, not by test count:
- testcontainers / Docker-backed tests in their own job
- Trunk, wasm, napi, tauri, or GUI example builds in their own job
- host-only unit tests in a job that excludes heavy examples
- print disk usage before and after each shard so a dependency bump cannot silently push the runner over the edge

Why Cargo Workspaces Fill Runners

Safe Split Order

  1. Measure target/, Cargo registry/git cache, Docker, and /tmp before the cleanup step.
  2. Create a Docker/testcontainers shard first if Docker contributes meaningful space.
  3. Create a Trunk/wasm/napi/tauri shard for frontend or GUI-adjacent crates.
  4. Run host-only unit tests with a denylist for heavy examples rather than an allowlist that misses inline tests.
  5. Only clean target/ between shards if later steps do not need the compiled outputs.
  6. Keep disk telemetry in every shard so the next dependency bump is caught early.
Free AI deletion trial

Need a delete / confirm / protect answer for this runner?

Submit the form first; the failing job link can follow. We check whether free guidance is enough before asking for the free SafeDisk AI deletion trial.

Add output optional

Start with email. Output can follow after the first reply.