From 8c1f36b95acc36097acb31bd812636b30a61e2e1 Mon Sep 17 00:00:00 2001 From: Jason Ernst Date: Tue, 23 Dec 2025 22:43:18 -0800 Subject: [PATCH] Fix CI disk space issues by running tests sequentially with cleanup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- .github/workflows/lint-and-test.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.github/workflows/lint-and-test.yml b/.github/workflows/lint-and-test.yml index 41b6ea6..7121b08 100644 --- a/.github/workflows/lint-and-test.yml +++ b/.github/workflows/lint-and-test.yml @@ -39,6 +39,7 @@ jobs: - android-runner - org-runner fail-fast: false + max-parallel: 1 steps: - name: Checkout code @@ -57,6 +58,18 @@ jobs: restore-keys: | ${{ runner.os }}-pip- + - name: Free up disk space + run: | + echo "Disk space before cleanup:" + df -h + sudo rm -rf /usr/share/dotnet + sudo rm -rf /opt/ghc + sudo rm -rf /usr/local/share/boost + sudo rm -rf "$AGENT_TOOLSDIRECTORY" + sudo docker system prune -af --volumes + echo "Disk space after cleanup:" + df -h + - name: Install dependencies run: | python -m pip install --upgrade pip @@ -73,6 +86,13 @@ jobs: PY_COLORS: '1' ANSIBLE_FORCE_COLOR: '1' + - name: Clean up Docker after test + if: always() + run: | + docker system prune -af --volumes + echo "Disk space after test cleanup:" + df -h + - name: Upload molecule logs on failure if: failure() uses: actions/upload-artifact@v5