Skip to content

Commit

Permalink
test: update caching strategies for github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
russellwheatley committed Sep 11, 2024
1 parent cb481e0 commit 4e1c67b
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/android.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
with:
path: ~/.cache/firebase/emulators
key: firebase-emulators-v3-${{ github.run_id }}
key: firebase-emulators-v3-${{ runner.os }}
restore-keys: firebase-emulators-v3
- uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1
with:
Expand Down Expand Up @@ -76,7 +76,7 @@ jobs:
path: |
~/.android/avd/*
~/.android/adb*
key: avd-ubuntu
key: avd-${{ runner.os }}
- name: Start AVD then run E2E tests
uses: reactivecircus/android-emulator-runner@v2
with:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/ios.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,20 +44,20 @@ jobs:
- uses: hendrikmuhs/ccache-action@c92f40bee50034e84c763e33b317c77adaa81c92
name: Xcode Compile Cache
with:
key: ${{ runner.os }}-ios-v3
key: xcode-cache-${{ runner.os }}
max-size: 700M
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
name: Pods Cache
id: pods-cache
with:
path: tests/ios/Pods
key: ${{ runner.os }}-pods-v3-${{ hashFiles('tests/ios/Podfile.lock') }}
restore-keys: ${{ runner.os }}-ios-pods-v2
key: pods-v3-${{ runner.os }}-${{ hashFiles('tests/ios/Podfile.lock') }}
restore-keys: pods-v3-${{ runner.os }}
- name: Firebase Emulator Cache
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
with:
path: ~/.cache/firebase/emulators
key: firebase-emulators-v3-${{ github.run_id }}
key: firebase-emulators-v3-${{ runner.os }}
restore-keys: firebase-emulators-v3
- uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1
with:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/macos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,20 +44,20 @@ jobs:
- uses: hendrikmuhs/ccache-action@c92f40bee50034e84c763e33b317c77adaa81c92
name: Xcode Compile Cache
with:
key: ${{ runner.os }}-macos-v2
key: xcode-cache-${{ runner.os }}
max-size: 700M
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
name: Pods Cache
id: pods-cache
with:
path: tests/macos/Pods
key: ${{ runner.os }}-pods-v2-${{ hashFiles('tests/macos/Podfile.lock') }}
restore-keys: ${{ runner.os }}-macos-pods-v1
key: pods-v3-${{ runner.os }}-${{ hashFiles('tests/macos/Podfile.lock') }}
restore-keys: pods-v3-${{ runner.os }}
- name: Cache Firebase Emulator
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
with:
path: ~/.cache/firebase/emulators
key: firebase-emulators-v3-${{ github.run_id }}
key: firebase-emulators-v3-${{ runner.os }}
restore-keys: firebase-emulators-v3
- uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1
with:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/web.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
with:
path: ~/.cache/firebase/emulators
key: firebase-emulators-v3-${{ github.run_id }}
key: firebase-emulators-v3-${{ runner.os }}
restore-keys: firebase-emulators-v3
- name: Start Firebase Emulator
run: sudo chown -R 501:20 "/Users/runner/.npm" && cd ./.github/workflows/scripts && ./start-firebase-emulator.sh
Expand Down Expand Up @@ -107,7 +107,7 @@ jobs:
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
with:
path: ~/.cache/firebase/emulators
key: firebase-emulators-v3-${{ github.run_id }}
key: firebase-emulators-v3-${{ runner.os }}
restore-keys: firebase-emulators-v3
- name: Start Firebase Emulator
run: sudo chown -R 501:20 "/Users/runner/.npm" && cd ./.github/workflows/scripts && ./start-firebase-emulator.sh
Expand Down Expand Up @@ -162,7 +162,7 @@ jobs:
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
with:
path: ~/.cache/firebase/emulators
key: firebase-emulators-v3-${{ github.run_id }}
key: firebase-emulators-v3-${{ runner.os }}
restore-keys: firebase-emulators-v3
- name: Start Firebase Emulator
run: sudo chown -R 501:20 "/Users/runner/.npm" && cd ./.github/workflows/scripts && ./start-firebase-emulator.sh
Expand Down

0 comments on commit 4e1c67b

Please sign in to comment.