Skip to content

Commit c526fec

Browse files
committed
Build: Drop actions/cache, use cache built into actions-setup-node
Also, replace one remaining `npm install` in CI with `npm ci`.
1 parent ab8fd84 commit c526fec

3 files changed

Lines changed: 15 additions & 36 deletions

File tree

.github/workflows/browserstack-dispatch.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,15 @@ jobs:
1616
env:
1717
BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }}
1818
BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
19+
NODE_VERSION: 22.x
1920
steps:
2021
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2122

2223
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
2324
with:
24-
node-version: 20
25+
node-version: ${{ env.NODE_VERSION }}
26+
cache: npm
27+
cache-dependency-path: '**/package-lock.json'
2528

2629
- name: Install dependencies
2730
run: npm ci

.github/workflows/browserstack.yml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,17 +45,11 @@ jobs:
4545
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
4646
with:
4747
node-version: ${{ env.NODE_VERSION }}
48-
49-
- name: Cache
50-
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
51-
with:
52-
path: ~/.npm
53-
key: ${{ runner.os }}-node-${{ env.NODE_VERSION }}-npm-lock-${{ hashFiles('**/package-lock.json') }}
54-
restore-keys: |
55-
${{ runner.os }}-node-${{ env.NODE_VERSION }}-npm-lock-
48+
cache: npm
49+
cache-dependency-path: '**/package-lock.json'
5650

5751
- name: Install dependencies
58-
run: npm install
52+
run: npm ci
5953

6054
- name: Build jQuery Mousewheel
6155
run: npm run build

.github/workflows/node.js.yml

Lines changed: 8 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,8 @@ jobs:
3131
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
3232
with:
3333
node-version: ${{ matrix.NODE_VERSION }}
34-
35-
- name: Cache
36-
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
37-
with:
38-
path: ~/.npm
39-
key: ${{ runner.os }}-node-${{ matrix.NODE_VERSION }}-npm-lock-${{ hashFiles('**/package-lock.json') }}
40-
restore-keys: |
41-
${{ runner.os }}-node-${{ matrix.NODE_VERSION }}-npm-lock-
34+
cache: npm
35+
cache-dependency-path: '**/package-lock.json'
4236

4337
- name: Set download URL for Firefox ESR (old)
4438
run: |
@@ -80,17 +74,11 @@ jobs:
8074
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
8175
with:
8276
node-version: ${{ env.NODE_VERSION }}
83-
84-
- name: Cache
85-
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
86-
with:
87-
path: ~/.npm
88-
key: ${{ runner.os }}-node-${{ env.NODE_VERSION }}-npm-lock-${{ hashFiles('**/package-lock.json') }}
89-
restore-keys: |
90-
${{ runner.os }}-node-${{ env.NODE_VERSION }}-npm-lock-
77+
cache: npm
78+
cache-dependency-path: '**/package-lock.json'
9179

9280
- name: Install dependencies
93-
run: npm install
81+
run: npm ci
9482

9583
- name: Run tests in Edge in IE mode
9684
run: npm run test:ie
@@ -108,17 +96,11 @@ jobs:
10896
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
10997
with:
11098
node-version: ${{ env.NODE_VERSION }}
111-
112-
- name: Cache
113-
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
114-
with:
115-
path: ~/.npm
116-
key: ${{ runner.os }}-node-${{ env.NODE_VERSION }}-npm-lock-${{ hashFiles('**/package-lock.json') }}
117-
restore-keys: |
118-
${{ runner.os }}-node-${{ env.NODE_VERSION }}-npm-lock-
99+
cache: npm
100+
cache-dependency-path: '**/package-lock.json'
119101

120102
- name: Install dependencies
121-
run: npm install
103+
run: npm ci
122104

123105
- name: Run tests
124106
run: npm run test:safari

0 commit comments

Comments
 (0)