From 309893b722cda4494b82e9d056a182dd8f76eac5 Mon Sep 17 00:00:00 2001 From: Kurt Himebauch <136133082+xXJSONDeruloXx@users.noreply.github.com> Date: Tue, 24 Nov 2026 00:46:03 -0500 Subject: [PATCH] fix(ci): cache Robolectric's Android jars so Maven Central 429s stop failing unit tests (#3127) --- .github/workflows/build.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 60f8882401..abb5207142 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -692,6 +692,16 @@ jobs: if-no-files-found: ignore overwrite: true + - name: Resolve the Robolectric version + id: robolectric + run: | + echo "version=$(grep -o "org.robolectric:robolectric:[0-9.]*" app/build.gradle | cut -d: -f3)" >> "$GITHUB_OUTPUT" + # Robolectric downloads these from Maven Central on first use without retrying, and 429s fail whole test classes. + - name: Cache Robolectric's Android jars + uses: actions/cache@v4 + with: + path: ~/.m2/repository/org/robolectric/android-all-instrumented + key: robolectric-android-all-${{ steps.robolectric.outputs.version }} - name: Unit tests id: unit-tests env: