Skip to content

Commit

Permalink
test: more cache key/restore-keys work
Browse files Browse the repository at this point in the history
- had a typo in one of the usages: restore-key -> restore-keys
- the versioning in the cache key should be before disambiguating key components
- all keys need something disambiguating or they never update (e.g., ios firestore emulator)
  • Loading branch information
mikehardy committed May 10, 2021
1 parent 221eb50 commit 3b48240
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 18 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/create_test_patches.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ jobs:
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/package.json') }}-v1
key: ${{ runner.os }}-yarn-v1-${{ hashFiles('**/package.json') }}
restore-keys: ${{ runner.os }}-yarn-v1

- name: Yarn Install
uses: nick-invision/retry@v2
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ jobs:
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/package.json') }}
restore-keys: ${{ runner.os }}-yarn
key: ${{ runner.os }}-yarn-v1-${{ hashFiles('**/package.json') }}
restore-keys: ${{ runner.os }}-yarn-v1
- name: Yarn Install
uses: nick-invision/retry@v2
with:
Expand Down Expand Up @@ -79,8 +79,8 @@ jobs:
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/package.json') }}
restore-keys: ${{ runner.os }}-yarn
key: ${{ runner.os }}-yarn-v1-${{ hashFiles('**/package.json') }}
restore-keys: ${{ runner.os }}-yarn-v1
- name: Yarn Install
uses: nick-invision/retry@v2
with:
Expand Down Expand Up @@ -113,8 +113,8 @@ jobs:
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/package.json') }}-with-website
restore-keys: ${{ runner.os }}-yarn
key: ${{ runner.os }}-yarn-with-website-v1-${{ hashFiles('**/package.json') }}
restore-keys: ${{ runner.os }}-yarn-with-website-v1
- name: Yarn Install
uses: nick-invision/retry@v2
with:
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/tests_e2e_android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ jobs:
uses: actions/cache@v2
with:
path: ~/.cache/firebase/emulators
key: firebase-emulators-${{ github.run_id }}-v1
restore-key: firebase-emulators
key: firebase-emulators-v1-${{ github.run_id }}
restore-keys: firebase-emulators-v1

- name: Start Firestore Emulator
run: yarn tests:emulator:start-ci
Expand All @@ -67,15 +67,15 @@ jobs:
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/package.json') }}-v1
restore-keys: ${{ runner.os }}-yarn
key: ${{ runner.os }}-yarn-v1-${{ hashFiles('**/package.json') }}
restore-keys: ${{ runner.os }}-yarn-v1

- uses: actions/cache@v2
name: Gradle Cache
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}-v1
restore-keys: ${{ runner.os }}-gradle
key: ${{ runner.os }}-gradle-v1-${{ hashFiles('**/*.gradle*') }}
restore-keys: ${{ runner.os }}-gradle-v1

- name: Yarn Install
uses: nick-invision/retry@v2
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/tests_e2e_ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ jobs:
uses: actions/cache@v2
with:
path: ~/.cache/firebase/emulators
key: firebase-emulators-v1
key: firebase-emulators-v1-${{ github.run_id }}
restore-keys: firebase-emulators-v1

- name: Start Firestore Emulator
run: yarn tests:emulator:start-ci
Expand All @@ -80,8 +81,8 @@ jobs:
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/package.json') }}-v1
restore-keys: ${{ runner.os }}-yarn
key: ${{ runner.os }}-yarn-v1-${{ hashFiles('**/package.json') }}
restore-keys: ${{ runner.os }}-yarn-v1

- uses: actions/cache@v2
name: Cache Pods
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tests_jest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ jobs:
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/package.json') }}
restore-keys: ${{ runner.os }}-yarn
key: ${{ runner.os }}-yarn-v1-${{ hashFiles('**/package.json') }}
restore-keys: ${{ runner.os }}-yarn-v1
- name: Yarn Install
uses: nick-invision/retry@v2
with:
Expand Down

1 comment on commit 3b48240

@vercel
Copy link

@vercel vercel bot commented on 3b48240 May 10, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.