From 30c78234578d5e01caead61061f4ab53b89e1c3a Mon Sep 17 00:00:00 2001 From: Gothwad Tech Date: Mon, 23 Nov 2026 16:56:51 +0000 Subject: [PATCH] ci: retry the unit test task once MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The main-push run failed at MavenArtifactFetcher.java:129 — Robolectric could not download its android-all runtime, not a test failure (the same commit passed on the PR two minutes earlier). Retry the task once, then surface the real failure. --- .github/workflows/quality.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/quality.yml b/.github/workflows/quality.yml index 0e513b8..685ae18 100644 --- a/.github/workflows/quality.yml +++ b/.github/workflows/quality.yml @@ -67,10 +67,16 @@ jobs: with: cache-read-only: ${{ github.ref != 'refs/heads/main' }} - - name: Unit tests (app + common) + - name: Unit tests run: | set -o pipefail - ./gradlew :app:testDebugUnitTest --no-daemon --continue --stacktrace 2>&1 | tee gradle.log + # Robolectric downloads its android-all runtime from Maven Central on first use; + # that fetch fails now and then and takes the whole job with it. One retry, then + # let the real failure through. + ./gradlew :app:testDebugUnitTest --no-daemon --continue --stacktrace 2>&1 | tee gradle.log || { + echo "::warning::first attempt failed, retrying once (Robolectric artifact fetch)" + ./gradlew :app:testDebugUnitTest --no-daemon --continue --stacktrace 2>&1 | tee -a gradle.log + } # The raw log lives behind an endpoint a sandboxed runner often cannot reach, and a red X # with no message teaches nobody anything: put the useful lines in the job summary.