Skip to content

Commit ec89ee5

Browse files
committed
Build: Simplify caching in CI
Our setup is pretty standard, so manual configuration of `actions/cache` is an overkill. Relying on built-in `actions/node` caching will also resolve differences between caching configurations for macOS/Linux vs. Windows.
1 parent efcf81a commit ec89ee5

File tree

1 file changed

+6
-24
lines changed

1 file changed

+6
-24
lines changed

.github/workflows/browser-tests.yml

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,8 @@ jobs:
3737
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
3838
with:
3939
node-version: ${{ env.NODE_VERSION }}
40-
41-
- name: Cache
42-
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
43-
with:
44-
path: ~/.npm
45-
key: ${{ runner.os }}-node-${{ env.NODE_VERSION }}-npm-lock-${{ hashFiles('**/package-lock.json') }}
46-
restore-keys: |
47-
${{ runner.os }}-node-${{ env.NODE_VERSION }}-npm-lock-
40+
cache: npm
41+
cache-dependency-path: '**/package-lock.json'
4842

4943
- name: Set download URL for Firefox ESR (old)
5044
run: |
@@ -92,14 +86,8 @@ jobs:
9286
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
9387
with:
9488
node-version: ${{ env.NODE_VERSION }}
95-
96-
- name: Cache
97-
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
98-
with:
99-
path: ~/.npm
100-
key: ${{ runner.os }}-node-${{ env.NODE_VERSION }}-npm-lock-${{ hashFiles('**/package-lock.json') }}
101-
restore-keys: |
102-
${{ runner.os }}-node-${{ env.NODE_VERSION }}-npm-lock-
89+
cache: npm
90+
cache-dependency-path: '**/package-lock.json'
10391

10492
- name: Install dependencies
10593
run: npm install
@@ -121,14 +109,8 @@ jobs:
121109
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
122110
with:
123111
node-version: ${{ env.NODE_VERSION }}
124-
125-
- name: Cache
126-
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
127-
with:
128-
path: ~/.npm
129-
key: ${{ runner.os }}-node-${{ env.NODE_VERSION }}-npm-lock-${{ hashFiles('**/package-lock.json') }}
130-
restore-keys: |
131-
${{ runner.os }}-node-${{ env.NODE_VERSION }}-npm-lock-
112+
cache: npm
113+
cache-dependency-path: '**/package-lock.json'
132114

133115
- name: Install dependencies
134116
run: npm install

0 commit comments

Comments
 (0)