Skip to content

Commit 3b48240

Browse files
committed
test: more cache key/restore-keys work
- 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)
1 parent 221eb50 commit 3b48240

File tree

5 files changed

+20
-18
lines changed

5 files changed

+20
-18
lines changed

.github/workflows/create_test_patches.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ jobs:
4747
id: yarn-cache
4848
with:
4949
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
50-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/package.json') }}-v1
50+
key: ${{ runner.os }}-yarn-v1-${{ hashFiles('**/package.json') }}
51+
restore-keys: ${{ runner.os }}-yarn-v1
5152

5253
- name: Yarn Install
5354
uses: nick-invision/retry@v2

.github/workflows/linting.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ jobs:
3131
id: yarn-cache
3232
with:
3333
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
34-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/package.json') }}
35-
restore-keys: ${{ runner.os }}-yarn
34+
key: ${{ runner.os }}-yarn-v1-${{ hashFiles('**/package.json') }}
35+
restore-keys: ${{ runner.os }}-yarn-v1
3636
- name: Yarn Install
3737
uses: nick-invision/retry@v2
3838
with:
@@ -79,8 +79,8 @@ jobs:
7979
id: yarn-cache
8080
with:
8181
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
82-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/package.json') }}
83-
restore-keys: ${{ runner.os }}-yarn
82+
key: ${{ runner.os }}-yarn-v1-${{ hashFiles('**/package.json') }}
83+
restore-keys: ${{ runner.os }}-yarn-v1
8484
- name: Yarn Install
8585
uses: nick-invision/retry@v2
8686
with:
@@ -113,8 +113,8 @@ jobs:
113113
id: yarn-cache
114114
with:
115115
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
116-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/package.json') }}-with-website
117-
restore-keys: ${{ runner.os }}-yarn
116+
key: ${{ runner.os }}-yarn-with-website-v1-${{ hashFiles('**/package.json') }}
117+
restore-keys: ${{ runner.os }}-yarn-with-website-v1
118118
- name: Yarn Install
119119
uses: nick-invision/retry@v2
120120
with:

.github/workflows/tests_e2e_android.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ jobs:
5252
uses: actions/cache@v2
5353
with:
5454
path: ~/.cache/firebase/emulators
55-
key: firebase-emulators-${{ github.run_id }}-v1
56-
restore-key: firebase-emulators
55+
key: firebase-emulators-v1-${{ github.run_id }}
56+
restore-keys: firebase-emulators-v1
5757

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

7373
- uses: actions/cache@v2
7474
name: Gradle Cache
7575
with:
7676
path: ~/.gradle/caches
77-
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}-v1
78-
restore-keys: ${{ runner.os }}-gradle
77+
key: ${{ runner.os }}-gradle-v1-${{ hashFiles('**/*.gradle*') }}
78+
restore-keys: ${{ runner.os }}-gradle-v1
7979

8080
- name: Yarn Install
8181
uses: nick-invision/retry@v2

.github/workflows/tests_e2e_ios.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ jobs:
6666
uses: actions/cache@v2
6767
with:
6868
path: ~/.cache/firebase/emulators
69-
key: firebase-emulators-v1
69+
key: firebase-emulators-v1-${{ github.run_id }}
70+
restore-keys: firebase-emulators-v1
7071

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

8687
- uses: actions/cache@v2
8788
name: Cache Pods

.github/workflows/tests_jest.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ jobs:
4343
id: yarn-cache
4444
with:
4545
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
46-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/package.json') }}
47-
restore-keys: ${{ runner.os }}-yarn
46+
key: ${{ runner.os }}-yarn-v1-${{ hashFiles('**/package.json') }}
47+
restore-keys: ${{ runner.os }}-yarn-v1
4848
- name: Yarn Install
4949
uses: nick-invision/retry@v2
5050
with:

0 commit comments

Comments
 (0)