Fix CI disk space issues by running tests sequentially with cleanup#36
Fix CI disk space issues by running tests sequentially with cleanup#36
Conversation
The java-runner and android-runner molecule tests were failing due to running out of disk space on GitHub Actions runners. Both tests pull the compscidr/github-runner-android image which is ~15GB and includes the full Android SDK/NDK. Changes: - Run molecule tests sequentially (max-parallel: 1) instead of in parallel - Add disk cleanup step before tests to free up ~10-15GB by removing unused software (.NET SDK, GHC, Boost, agent tools) - Add Docker cleanup after each test to ensure space for next test - Clean up Docker images and volumes between tests This ensures each test has sufficient disk space without modifying the actual runner images or test scenarios. Fixes failing PRs #35, #34, #33, #32, #28 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR fixes disk space exhaustion issues in GitHub Actions CI that were causing molecule tests to fail. The solution involves running tests sequentially and adding aggressive disk cleanup steps.
- Configures matrix strategy to run tests sequentially with
max-parallel: 1instead of in parallel - Adds pre-test cleanup removing ~10-15GB of unused software (.NET, GHC, Boost, agent tools)
- Adds post-test Docker cleanup to free space between test runs
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| sudo rm -rf /opt/ghc | ||
| sudo rm -rf /usr/local/share/boost | ||
| sudo rm -rf "$AGENT_TOOLSDIRECTORY" | ||
| sudo docker system prune -af --volumes |
There was a problem hiding this comment.
The docker system prune -af --volumes in the pre-test cleanup step will remove all Docker images and cached layers. Since tests run sequentially with max-parallel: 1, the first test in each job will need to pull all images fresh, but subsequent tests could potentially benefit from reusing layers if this prune is skipped on the first iteration. Consider moving this Docker cleanup to only run in the post-test step, which already cleans up after each test. The filesystem cleanup (dotnet, ghc, boost, agent tools) should be sufficient for the pre-test step.
| sudo docker system prune -af --volumes |
Summary
Problem
The java-runner and android-runner molecule tests were consistently failing with "no space left on device" errors. Both tests pull the
compscidr/github-runner-androidimage which is ~15GB and includes the full Android SDK/NDK. When running in parallel, GitHub Actions runners (which have ~14GB free initially) run out of space.Solution
max-parallel: 1to run tests one at a timedocker system pruneafter each test to ensure space for the next testTesting
Related Issues
Fixes failing PRs: #35, #34, #33, #32, #28
🤖 Generated with Claude Code