Skip to content

Commit dc74643

Browse files
committed
test(ci): hashFiles on specific files vs big globs
should help workaround hashFile failures flaking CI builds, and be a lot faster too since recursive search is not necessary At same time, nothing recursively can change without these lock files changing, so it should be equivalent
1 parent f85b19c commit dc74643

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

.github/workflows/create_test_patches.yml

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

5353
- name: Yarn Install

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
id: yarn-cache
3232
with:
3333
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
34-
key: ${{ runner.os }}-yarn-v1-${{ hashFiles('**/package.json') }}
34+
key: ${{ runner.os }}-yarn-v1-${{ hashFiles('yarn.lock') }}
3535
restore-keys: ${{ runner.os }}-yarn-v1
3636
- name: Yarn Install
3737
uses: nick-invision/retry@v2

.github/workflows/linting.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
id: yarn-cache
3737
with:
3838
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
39-
key: ${{ runner.os }}-yarn-v1-${{ hashFiles('**/package.json') }}
39+
key: ${{ runner.os }}-yarn-v1-${{ hashFiles('yarn.lock') }}
4040
restore-keys: ${{ runner.os }}-yarn-v1
4141
- name: Yarn Install
4242
uses: nick-invision/retry@v2
@@ -75,7 +75,7 @@ jobs:
7575
id: yarn-cache
7676
with:
7777
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
78-
key: ${{ runner.os }}-yarn-v1-${{ hashFiles('**/package.json') }}
78+
key: ${{ runner.os }}-yarn-v1-${{ hashFiles('yarn.lock') }}
7979
restore-keys: ${{ runner.os }}-yarn-v1
8080
- name: Yarn Install
8181
uses: nick-invision/retry@v2
@@ -109,7 +109,7 @@ jobs:
109109
id: yarn-cache
110110
with:
111111
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
112-
key: ${{ runner.os }}-yarn-with-website-v1-${{ hashFiles('**/package.json') }}
112+
key: ${{ runner.os }}-yarn-with-website-v1-${{ hashFiles('yarn.lock') }}
113113
restore-keys: ${{ runner.os }}-yarn-with-website-v1
114114
- name: Yarn Install
115115
uses: nick-invision/retry@v2

.github/workflows/tests_e2e_android.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
id: yarn-cache
6262
with:
6363
path: ${{ steps.workflow-variables.outputs.yarn-cache-dir }}
64-
key: ${{ runner.os }}-yarn-v1-${{ hashFiles('**/package.json') }}
64+
key: ${{ runner.os }}-yarn-v1-${{ hashFiles('yarn.lock') }}
6565
restore-keys: ${{ runner.os }}-yarn-v1
6666

6767
- name: Yarn Install

.github/workflows/tests_e2e_ios.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ jobs:
6262
id: yarn-cache
6363
with:
6464
path: ${{ steps.workflow-variables.outputs.yarn-cache-dir }}
65-
key: ${{ runner.os }}-yarn-v1-${{ hashFiles('**/package.json') }}
65+
key: ${{ runner.os }}-yarn-v1-${{ hashFiles('yarn.lock') }}
6666
restore-keys: ${{ runner.os }}-yarn-v1
6767

6868
- uses: actions/cache@v2
@@ -105,7 +105,7 @@ jobs:
105105
id: pods-cache
106106
with:
107107
path: tests/ios/Pods
108-
key: ${{ runner.os }}-pods-v2-${{ hashFiles('**/Podfile.lock') }}
108+
key: ${{ runner.os }}-pods-v2-${{ hashFiles('tests/ios/Podfile.lock') }}
109109
restore-keys: ${{ runner.os }}-pods-v2
110110

111111
- name: Pod Install

.github/workflows/tests_jest.yml

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

0 commit comments

Comments
 (0)