From fb6129395381a58d7ff2af3085e6e0dc87d716ee Mon Sep 17 00:00:00 2001 From: Mike Hardy Date: Thu, 1 Jan 2026 09:56:48 -0500 Subject: [PATCH 1/3] chore(ci): only cache main - avoid branches LRU evicting main cache use the separate actions/cache "restore" and "save" actions so we may only save optional based on whether we are on main or not actions/cache isolates branch caches from main to avoid branch cache poison attacks on main runs but branches may see main cache as those caches are considered trustworthy branch caches do consume available LRU storage though, meaning branch caches could evict main caches and in high traffic / large cache repositories like this one that means caches LRU out frequently and cache hit rates are terrible unless you cache on main only --- .github/workflows/tests_e2e_android.yml | 47 ++++++++++++++++---- .github/workflows/tests_e2e_ios.yml | 57 ++++++++++++++++++++----- .github/workflows/tests_e2e_other.yml | 52 +++++++++++++++++----- 3 files changed, 127 insertions(+), 29 deletions(-) diff --git a/.github/workflows/tests_e2e_android.yml b/.github/workflows/tests_e2e_android.yml index 6b3c46f54d..6a0b742cc4 100644 --- a/.github/workflows/tests_e2e_android.yml +++ b/.github/workflows/tests_e2e_android.yml @@ -142,8 +142,8 @@ jobs: echo "metro-cache=$HOME/.metro" >> $GITHUB_OUTPUT echo "tempdir=$TMPDIR" >> $GITHUB_OUTPUT - - uses: actions/cache@v4 - name: Yarn Cache + - name: Yarn Cache Restore + uses: actions/cache/restore@v4 id: yarn-cache with: path: .yarn/cache @@ -158,8 +158,9 @@ jobs: max_attempts: 3 command: DETOX_DISABLE_POSTINSTALL=1 yarn - - name: Cache Firestore Emulator - uses: actions/cache@v4 + - name: Firestore Emulator Restore + uses: actions/cache/restore@v4 + id: firestore-emulator-cache with: path: ~/.cache/firebase/emulators key: firebase-emulators-v1-${{ github.run_id }} @@ -168,8 +169,9 @@ jobs: - name: Start Firestore Emulator run: yarn tests:emulator:start-ci - - uses: actions/cache@v4 - name: Gradle Cache + - name: Gradle Cache Restore + uses: actions/cache/restore@v4 + id: gradle-cache with: path: ~/.gradle/caches key: ${{ runner.os }}-gradle-v1-${{ hashFiles('yarn.lock', 'tests/android/build.gradle', 'tests/android/app/build.gradle') }} @@ -183,8 +185,9 @@ jobs: max_attempts: 3 command: yarn tests:android:build - - name: Metro Bundler Cache - uses: actions/cache@v4 + - name: Metro Bundler Cache Restore + uses: actions/cache/restore@v4 + id: metro-bundler-cache with: path: ${{ steps.workflow-variables.outputs.metro-cache }} key: ${{ runner.os }}-metro-v1-${{ github.run_id }} @@ -241,3 +244,31 @@ jobs: with: name: adb_logs_${{ matrix.api-level}}_${{ matrix.arch }}_${{ matrix.target }}_${{ matrix.iteration }} path: adb-*.txt + + - name: Yarn Cache Save + uses: actions/cache/save@v4 + if: "${{ github.ref == 'refs/heads/main' }}" + with: + path: .yarn/cache + key: ${{ steps.yarn-cache.outputs.cache-primary-key }} + + - name: Firestore Emulator Cache Save + uses: actions/cache/save@v4 + if: "${{ github.ref == 'refs/heads/main' }}" + with: + path: ~/.cache/firebase/emulators + key: ${{ steps.firestore-emulator-cache.outputs.cache-primary-key }} + + - name: Gradle Cache Save + uses: actions/cache/save@v4 + if: "${{ github.ref == 'refs/heads/main' }}" + with: + path: ~/.gradle/caches + key: ${{ steps.gradle-cache.outputs.cache-primary-key }} + + - name: Metro Bundler Cache Save + uses: actions/cache/save@v4 + if: "${{ github.ref == 'refs/heads/main' }}" + with: + path: ${{ steps.workflow-variables.outputs.metro-cache }} + key: ${{ steps.metro-bundler-cache.outputs.cache-primary-key }} diff --git a/.github/workflows/tests_e2e_ios.yml b/.github/workflows/tests_e2e_ios.yml index 0b7bd291d1..fed57374f4 100644 --- a/.github/workflows/tests_e2e_ios.yml +++ b/.github/workflows/tests_e2e_ios.yml @@ -141,16 +141,16 @@ jobs: echo "metro-cache=$HOME/.metro" >> $GITHUB_OUTPUT echo "xcode-version=$(xcodebuild -version|tail -1|cut -f3 -d' ')" >> $GITHUB_OUTPUT - - uses: actions/cache@v4 - name: Yarn Cache + - name: Yarn Cache Restore + uses: actions/cache/restore@v4 id: yarn-cache with: path: .yarn/cache key: ${{ runner.os }}-ios-yarn-v1-${{ hashFiles('yarn.lock') }} restore-keys: ${{ runner.os }}-ios-yarn-v1 - - uses: actions/cache@v4 - name: Detox Framework Cache + - name: Detox Framework Cache Restore + uses: actions/cache/restore@v4 id: detox-cache with: path: ~/Library/Detox/ios @@ -185,8 +185,8 @@ jobs: max_attempts: 3 command: gem update cocoapods xcodeproj - - uses: actions/cache@v4 - name: Cache Pods + - name: Pods Cache Restore + uses: actions/cache/restore@v4 id: pods-cache with: path: tests/ios/Pods @@ -201,8 +201,9 @@ jobs: max_attempts: 3 command: yarn tests:ios:pod:install - - name: Cache Firestore Emulator - uses: actions/cache@v4 + - name: Firestore Emulator Restore + uses: actions/cache/restore@v4 + id: firestore-emulator-cache with: path: ~/.cache/firebase/emulators key: firebase-emulators-v1-${{ github.run_id }} @@ -254,8 +255,9 @@ jobs: ccache -s shell: bash - - name: Metro Bundler Cache - uses: actions/cache@v4 + - name: Metro Bundler Cache Restore + uses: actions/cache/restore@v4 + id: metro-bundler-cache with: path: ${{ steps.workflow-variables.outputs.metro-cache }} key: ${{ runner.os }}-ios-metro-v1-${{ github.run_id }} @@ -344,3 +346,38 @@ jobs: continue-on-error: true with: verbose: true + + - name: Yarn Cache Save + uses: actions/cache/save@v4 + if: "${{ github.ref == 'refs/heads/main' }}" + with: + path: .yarn/cache + key: ${{ steps.yarn-cache.outputs.cache-primary-key }} + + - name: Detox Framework Cache Save + uses: actions/cache/save@v4 + if: "${{ github.ref == 'refs/heads/main' }}" + with: + path: ~/Library/Detox/ios + key: ${{ steps.detox-cache.outputs.cache-primary-key }} + + - name: Pods Cache Save + uses: actions/cache/save@v4 + if: "${{ github.ref == 'refs/heads/main' }}" + with: + path: tests/ios/Pods + key: ${{ steps.pods-cache.outputs.cache-primary-key }} + + - name: Firestore Emulator Cache Save + uses: actions/cache/save@v4 + if: "${{ github.ref == 'refs/heads/main' }}" + with: + path: ~/.cache/firebase/emulators + key: ${{ steps.firestore-emulator-cache.outputs.cache-primary-key }} + + - name: Metro Bundler Cache Save + uses: actions/cache/save@v4 + if: "${{ github.ref == 'refs/heads/main' }}" + with: + path: ${{ steps.workflow-variables.outputs.metro-cache }} + key: ${{ steps.metro-bundler-cache.outputs.cache-primary-key }} diff --git a/.github/workflows/tests_e2e_other.yml b/.github/workflows/tests_e2e_other.yml index 735e95d3a1..3853b516af 100644 --- a/.github/workflows/tests_e2e_other.yml +++ b/.github/workflows/tests_e2e_other.yml @@ -135,8 +135,8 @@ jobs: echo "metro-cache=$HOME/.metro" >> $GITHUB_OUTPUT echo "xcode-version=$(xcodebuild -version|tail -1|cut -f3 -d' ')" >> $GITHUB_OUTPUT - - uses: actions/cache@v4 - name: Yarn Cache + - name: Yarn Cache Restore + uses: actions/cache/restore@v4 id: yarn-cache with: path: .yarn/cache @@ -171,13 +171,13 @@ jobs: max_attempts: 3 command: gem update cocoapods xcodeproj - - uses: actions/cache@v4 - name: Cache Pods + - name: Pods Cache Restore + uses: actions/cache/restore@v4 id: pods-cache with: - path: tests/macos/Pods - key: ${{ runner.os }}-macos-pods-v2-${{ hashFiles('tests/macos/Podfile.lock') }} - restore-keys: ${{ runner.os }}-macos-pods-v2 + path: tests/ios/Pods + key: ${{ runner.os }}-macos-pods-v3-${{ hashFiles('tests/ios/Podfile.lock') }} + restore-keys: ${{ runner.os }}-macos-pods-v3 - name: Pod Install uses: nick-fields/retry@v3 @@ -187,8 +187,9 @@ jobs: max_attempts: 3 command: yarn tests:macos:pod:install - - name: Cache Firestore Emulator - uses: actions/cache@v4 + - name: Firestore Emulator Cache Restore + uses: actions/cache/restore@v4 + id: firestore-emulator-cache with: path: ~/.cache/firebase/emulators key: firebase-emulators-v1-${{ github.run_id }} @@ -217,8 +218,9 @@ jobs: ccache -s shell: bash - - name: Metro Bundler Cache - uses: actions/cache@v4 + - name: Metro Bundler Cache Restore + uses: actions/cache/restore@v4 + id: metro-bundler-cache with: path: ${{ steps.workflow-variables.outputs.metro-cache }} key: ${{ runner.os }}-macos-metro-v1-${{ github.run_id }} @@ -281,3 +283,31 @@ jobs: with: name: syslog-${{ matrix.iteration }} path: syslog.log + + - name: Yarn Cache Save + uses: actions/cache/save@v4 + if: "${{ github.ref == 'refs/heads/main' }}" + with: + path: .yarn/cache + key: ${{ steps.yarn-cache.outputs.cache-primary-key }} + + - name: Pods Cache Save + uses: actions/cache/save@v4 + if: "${{ github.ref == 'refs/heads/main' }}" + with: + path: tests/ios/Pods + key: ${{ steps.pods-cache.outputs.cache-primary-key }} + + - name: Firestore Emulator Cache Save + uses: actions/cache/save@v4 + if: "${{ github.ref == 'refs/heads/main' }}" + with: + path: ~/.cache/firebase/emulators + key: ${{ steps.firestore-emulator-cache.outputs.cache-primary-key }} + + - name: Metro Bundler Cache Save + uses: actions/cache/save@v4 + if: "${{ github.ref == 'refs/heads/main' }}" + with: + path: ${{ steps.workflow-variables.outputs.metro-cache }} + key: ${{ steps.metro-bundler-cache.outputs.cache-primary-key }} From 6906c939ae420dfbc06bc173bb65c53c00e09a77 Mon Sep 17 00:00:00 2001 From: Mike Hardy Date: Thu, 1 Jan 2026 10:01:08 -0500 Subject: [PATCH 2/3] chore(ci): cache restore/save failures should never break the build very occasionally, there are errors in the `hashFiles` function used to calculate cache keys, and this causes a build error that is a flake, not a valid CI failure signal so, continue the workflow even if the caching setup has errors, as that is a recoverable problem and the workflow may still have a valid success outcome --- .github/workflows/create_test_patches.yml | 2 ++ .github/workflows/docs.yml | 2 ++ .github/workflows/linting.yml | 6 ++++++ .github/workflows/tests_e2e_android.yml | 8 ++++++++ .github/workflows/tests_e2e_ios.yml | 10 ++++++++++ .github/workflows/tests_e2e_other.yml | 8 ++++++++ .github/workflows/tests_jest.yml | 2 ++ 7 files changed, 38 insertions(+) diff --git a/.github/workflows/create_test_patches.yml b/.github/workflows/create_test_patches.yml index 1c2195b1d2..5519aa44fe 100644 --- a/.github/workflows/create_test_patches.yml +++ b/.github/workflows/create_test_patches.yml @@ -40,6 +40,7 @@ jobs: - uses: actions/cache/restore@v4 name: Yarn Cache Restore id: yarn-cache + continue-on-error: true with: path: .yarn/cache key: ${{ runner.os }}-yarn-v1-${{ hashFiles('yarn.lock') }} @@ -102,6 +103,7 @@ jobs: - uses: actions/cache/save@v4 name: Yarn Cache Save if: "${{ github.ref == 'refs/heads/main' }}" + continue-on-error: true with: path: .yarn/cache key: ${{ runner.os }}-yarn-v1-${{ hashFiles('yarn.lock') }} diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 3689304f33..0f67f094f7 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -27,6 +27,7 @@ jobs: - uses: actions/cache/restore@v4 name: Yarn Cache Restore id: yarn-cache + continue-on-error: true with: path: .yarn/cache key: ${{ runner.os }}-yarn-v1-${{ hashFiles('yarn.lock') }} @@ -46,6 +47,7 @@ jobs: - uses: actions/cache/save@v4 name: Yarn Cache Save if: "${{ github.ref == 'refs/heads/main' }}" + continue-on-error: true with: path: .yarn/cache key: ${{ runner.os }}-yarn-v1-${{ hashFiles('yarn.lock') }} diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index da7d4d0f32..54c77fbe61 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -33,6 +33,7 @@ jobs: - uses: actions/cache/restore@v4 name: Yarn Cache Restore id: yarn-cache + continue-on-error: true with: path: .yarn/cache key: ${{ runner.os }}-yarn-v1-${{ hashFiles('yarn.lock') }} @@ -54,6 +55,7 @@ jobs: - uses: actions/cache/save@v4 name: Yarn Cache Save if: "${{ github.ref == 'refs/heads/main' }}" + continue-on-error: true with: path: .yarn/cache key: ${{ runner.os }}-yarn-v1-${{ hashFiles('yarn.lock') }} @@ -73,6 +75,7 @@ jobs: - uses: actions/cache/restore@v4 name: Yarn Cache Restore id: yarn-cache + continue-on-error: true with: path: .yarn/cache key: ${{ runner.os }}-yarn-v1-${{ hashFiles('yarn.lock') }} @@ -89,6 +92,7 @@ jobs: - uses: actions/cache/save@v4 name: Yarn Cache Save if: "${{ github.ref == 'refs/heads/main' }}" + continue-on-error: true with: path: .yarn/cache key: ${{ runner.os }}-yarn-v1-${{ hashFiles('yarn.lock') }} @@ -108,6 +112,7 @@ jobs: - uses: actions/cache/restore@v4 name: Yarn Cache Restore id: yarn-cache + continue-on-error: true with: path: .yarn/cache key: ${{ runner.os }}-yarn-with-website-v1-${{ hashFiles('yarn.lock') }} @@ -131,6 +136,7 @@ jobs: - uses: actions/cache/save@v4 name: Yarn Cache Save if: "${{ github.ref == 'refs/heads/main' }}" + continue-on-error: true with: path: .yarn/cache key: ${{ runner.os }}-yarn-with-website-v1-${{ hashFiles('yarn.lock') }} diff --git a/.github/workflows/tests_e2e_android.yml b/.github/workflows/tests_e2e_android.yml index 6a0b742cc4..188055fcc1 100644 --- a/.github/workflows/tests_e2e_android.yml +++ b/.github/workflows/tests_e2e_android.yml @@ -145,6 +145,7 @@ jobs: - name: Yarn Cache Restore uses: actions/cache/restore@v4 id: yarn-cache + continue-on-error: true with: path: .yarn/cache key: ${{ runner.os }}-android-yarn-v1-${{ hashFiles('yarn.lock') }} @@ -161,6 +162,7 @@ jobs: - name: Firestore Emulator Restore uses: actions/cache/restore@v4 id: firestore-emulator-cache + continue-on-error: true with: path: ~/.cache/firebase/emulators key: firebase-emulators-v1-${{ github.run_id }} @@ -172,6 +174,7 @@ jobs: - name: Gradle Cache Restore uses: actions/cache/restore@v4 id: gradle-cache + continue-on-error: true with: path: ~/.gradle/caches key: ${{ runner.os }}-gradle-v1-${{ hashFiles('yarn.lock', 'tests/android/build.gradle', 'tests/android/app/build.gradle') }} @@ -188,6 +191,7 @@ jobs: - name: Metro Bundler Cache Restore uses: actions/cache/restore@v4 id: metro-bundler-cache + continue-on-error: true with: path: ${{ steps.workflow-variables.outputs.metro-cache }} key: ${{ runner.os }}-metro-v1-${{ github.run_id }} @@ -248,6 +252,7 @@ jobs: - name: Yarn Cache Save uses: actions/cache/save@v4 if: "${{ github.ref == 'refs/heads/main' }}" + continue-on-error: true with: path: .yarn/cache key: ${{ steps.yarn-cache.outputs.cache-primary-key }} @@ -255,6 +260,7 @@ jobs: - name: Firestore Emulator Cache Save uses: actions/cache/save@v4 if: "${{ github.ref == 'refs/heads/main' }}" + continue-on-error: true with: path: ~/.cache/firebase/emulators key: ${{ steps.firestore-emulator-cache.outputs.cache-primary-key }} @@ -262,6 +268,7 @@ jobs: - name: Gradle Cache Save uses: actions/cache/save@v4 if: "${{ github.ref == 'refs/heads/main' }}" + continue-on-error: true with: path: ~/.gradle/caches key: ${{ steps.gradle-cache.outputs.cache-primary-key }} @@ -269,6 +276,7 @@ jobs: - name: Metro Bundler Cache Save uses: actions/cache/save@v4 if: "${{ github.ref == 'refs/heads/main' }}" + continue-on-error: true with: path: ${{ steps.workflow-variables.outputs.metro-cache }} key: ${{ steps.metro-bundler-cache.outputs.cache-primary-key }} diff --git a/.github/workflows/tests_e2e_ios.yml b/.github/workflows/tests_e2e_ios.yml index fed57374f4..ed06cbad17 100644 --- a/.github/workflows/tests_e2e_ios.yml +++ b/.github/workflows/tests_e2e_ios.yml @@ -144,6 +144,7 @@ jobs: - name: Yarn Cache Restore uses: actions/cache/restore@v4 id: yarn-cache + continue-on-error: true with: path: .yarn/cache key: ${{ runner.os }}-ios-yarn-v1-${{ hashFiles('yarn.lock') }} @@ -152,6 +153,7 @@ jobs: - name: Detox Framework Cache Restore uses: actions/cache/restore@v4 id: detox-cache + continue-on-error: true with: path: ~/Library/Detox/ios key: ${{ runner.os }}-detox-framework-cache-${{ steps.workflow-variables.outputs.xcode-version }} @@ -188,6 +190,7 @@ jobs: - name: Pods Cache Restore uses: actions/cache/restore@v4 id: pods-cache + continue-on-error: true with: path: tests/ios/Pods key: ${{ runner.os }}-ios-pods-v3-${{ hashFiles('tests/ios/Podfile.lock') }} @@ -204,6 +207,7 @@ jobs: - name: Firestore Emulator Restore uses: actions/cache/restore@v4 id: firestore-emulator-cache + continue-on-error: true with: path: ~/.cache/firebase/emulators key: firebase-emulators-v1-${{ github.run_id }} @@ -258,6 +262,7 @@ jobs: - name: Metro Bundler Cache Restore uses: actions/cache/restore@v4 id: metro-bundler-cache + continue-on-error: true with: path: ${{ steps.workflow-variables.outputs.metro-cache }} key: ${{ runner.os }}-ios-metro-v1-${{ github.run_id }} @@ -350,6 +355,7 @@ jobs: - name: Yarn Cache Save uses: actions/cache/save@v4 if: "${{ github.ref == 'refs/heads/main' }}" + continue-on-error: true with: path: .yarn/cache key: ${{ steps.yarn-cache.outputs.cache-primary-key }} @@ -357,6 +363,7 @@ jobs: - name: Detox Framework Cache Save uses: actions/cache/save@v4 if: "${{ github.ref == 'refs/heads/main' }}" + continue-on-error: true with: path: ~/Library/Detox/ios key: ${{ steps.detox-cache.outputs.cache-primary-key }} @@ -364,6 +371,7 @@ jobs: - name: Pods Cache Save uses: actions/cache/save@v4 if: "${{ github.ref == 'refs/heads/main' }}" + continue-on-error: true with: path: tests/ios/Pods key: ${{ steps.pods-cache.outputs.cache-primary-key }} @@ -371,6 +379,7 @@ jobs: - name: Firestore Emulator Cache Save uses: actions/cache/save@v4 if: "${{ github.ref == 'refs/heads/main' }}" + continue-on-error: true with: path: ~/.cache/firebase/emulators key: ${{ steps.firestore-emulator-cache.outputs.cache-primary-key }} @@ -378,6 +387,7 @@ jobs: - name: Metro Bundler Cache Save uses: actions/cache/save@v4 if: "${{ github.ref == 'refs/heads/main' }}" + continue-on-error: true with: path: ${{ steps.workflow-variables.outputs.metro-cache }} key: ${{ steps.metro-bundler-cache.outputs.cache-primary-key }} diff --git a/.github/workflows/tests_e2e_other.yml b/.github/workflows/tests_e2e_other.yml index 3853b516af..35bdcfc661 100644 --- a/.github/workflows/tests_e2e_other.yml +++ b/.github/workflows/tests_e2e_other.yml @@ -138,6 +138,7 @@ jobs: - name: Yarn Cache Restore uses: actions/cache/restore@v4 id: yarn-cache + continue-on-error: true with: path: .yarn/cache key: ${{ runner.os }}-macos-yarn-v1-${{ hashFiles('yarn.lock') }} @@ -174,6 +175,7 @@ jobs: - name: Pods Cache Restore uses: actions/cache/restore@v4 id: pods-cache + continue-on-error: true with: path: tests/ios/Pods key: ${{ runner.os }}-macos-pods-v3-${{ hashFiles('tests/ios/Podfile.lock') }} @@ -190,6 +192,7 @@ jobs: - name: Firestore Emulator Cache Restore uses: actions/cache/restore@v4 id: firestore-emulator-cache + continue-on-error: true with: path: ~/.cache/firebase/emulators key: firebase-emulators-v1-${{ github.run_id }} @@ -221,6 +224,7 @@ jobs: - name: Metro Bundler Cache Restore uses: actions/cache/restore@v4 id: metro-bundler-cache + continue-on-error: true with: path: ${{ steps.workflow-variables.outputs.metro-cache }} key: ${{ runner.os }}-macos-metro-v1-${{ github.run_id }} @@ -287,6 +291,7 @@ jobs: - name: Yarn Cache Save uses: actions/cache/save@v4 if: "${{ github.ref == 'refs/heads/main' }}" + continue-on-error: true with: path: .yarn/cache key: ${{ steps.yarn-cache.outputs.cache-primary-key }} @@ -294,6 +299,7 @@ jobs: - name: Pods Cache Save uses: actions/cache/save@v4 if: "${{ github.ref == 'refs/heads/main' }}" + continue-on-error: true with: path: tests/ios/Pods key: ${{ steps.pods-cache.outputs.cache-primary-key }} @@ -301,6 +307,7 @@ jobs: - name: Firestore Emulator Cache Save uses: actions/cache/save@v4 if: "${{ github.ref == 'refs/heads/main' }}" + continue-on-error: true with: path: ~/.cache/firebase/emulators key: ${{ steps.firestore-emulator-cache.outputs.cache-primary-key }} @@ -308,6 +315,7 @@ jobs: - name: Metro Bundler Cache Save uses: actions/cache/save@v4 if: "${{ github.ref == 'refs/heads/main' }}" + continue-on-error: true with: path: ${{ steps.workflow-variables.outputs.metro-cache }} key: ${{ steps.metro-bundler-cache.outputs.cache-primary-key }} diff --git a/.github/workflows/tests_jest.yml b/.github/workflows/tests_jest.yml index 4b84bce78c..caff239d3b 100644 --- a/.github/workflows/tests_jest.yml +++ b/.github/workflows/tests_jest.yml @@ -40,6 +40,7 @@ jobs: - uses: actions/cache/restore@v4 name: Yarn Cache Restore id: yarn-cache + continue-on-error: true with: path: .yarn/cache key: ${{ runner.os }}-yarn-v1-${{ hashFiles('yarn.lock') }} @@ -59,6 +60,7 @@ jobs: - uses: actions/cache/save@v4 name: Yarn Cache Save if: "${{ github.ref == 'refs/heads/main' }}" + continue-on-error: true with: path: .yarn/cache key: ${{ runner.os }}-yarn-v1-${{ hashFiles('yarn.lock') }} From 877036d280fd12ebc31ef51d1adbed51d013a62c Mon Sep 17 00:00:00 2001 From: Mike Hardy Date: Thu, 1 Jan 2026 10:14:55 -0500 Subject: [PATCH 3/3] chore(ci): firebase emulators are cross-platform, share cache across OSs the downloaded/cached files are pure javascript and java, they may be shared across operating systems safely --- .github/workflows/tests_e2e_android.yml | 4 ++++ .github/workflows/tests_e2e_ios.yml | 4 ++++ .github/workflows/tests_e2e_other.yml | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/.github/workflows/tests_e2e_android.yml b/.github/workflows/tests_e2e_android.yml index 188055fcc1..be29cc203b 100644 --- a/.github/workflows/tests_e2e_android.yml +++ b/.github/workflows/tests_e2e_android.yml @@ -164,6 +164,8 @@ jobs: id: firestore-emulator-cache continue-on-error: true with: + # The firebase emulators are pure javascript and java, OS-independent + enableCrossOsArchive: true path: ~/.cache/firebase/emulators key: firebase-emulators-v1-${{ github.run_id }} restore-keys: firebase-emulators-v1 @@ -262,6 +264,8 @@ jobs: if: "${{ github.ref == 'refs/heads/main' }}" continue-on-error: true with: + # The firebase emulators are pure javascript and java, OS-independent + enableCrossOsArchive: true path: ~/.cache/firebase/emulators key: ${{ steps.firestore-emulator-cache.outputs.cache-primary-key }} diff --git a/.github/workflows/tests_e2e_ios.yml b/.github/workflows/tests_e2e_ios.yml index ed06cbad17..0462e80bd3 100644 --- a/.github/workflows/tests_e2e_ios.yml +++ b/.github/workflows/tests_e2e_ios.yml @@ -209,6 +209,8 @@ jobs: id: firestore-emulator-cache continue-on-error: true with: + # The firebase emulators are pure javascript and java, OS-independent + enableCrossOsArchive: true path: ~/.cache/firebase/emulators key: firebase-emulators-v1-${{ github.run_id }} restore-keys: firebase-emulators-v1 @@ -381,6 +383,8 @@ jobs: if: "${{ github.ref == 'refs/heads/main' }}" continue-on-error: true with: + # The firebase emulators are pure javascript and java, OS-independent + enableCrossOsArchive: true path: ~/.cache/firebase/emulators key: ${{ steps.firestore-emulator-cache.outputs.cache-primary-key }} diff --git a/.github/workflows/tests_e2e_other.yml b/.github/workflows/tests_e2e_other.yml index 35bdcfc661..98a41322f3 100644 --- a/.github/workflows/tests_e2e_other.yml +++ b/.github/workflows/tests_e2e_other.yml @@ -194,6 +194,8 @@ jobs: id: firestore-emulator-cache continue-on-error: true with: + # The firebase emulators are pure javascript and java, OS-independent + enableCrossOsArchive: true path: ~/.cache/firebase/emulators key: firebase-emulators-v1-${{ github.run_id }} restore-keys: firebase-emulators-v1 @@ -309,6 +311,8 @@ jobs: if: "${{ github.ref == 'refs/heads/main' }}" continue-on-error: true with: + # The firebase emulators are pure javascript and java, OS-independent + enableCrossOsArchive: true path: ~/.cache/firebase/emulators key: ${{ steps.firestore-emulator-cache.outputs.cache-primary-key }}