Skip to content

Commit bf599e8

Browse files
ci(github): update workflows to use .nvmrc and npm cache
1 parent f6125f0 commit bf599e8

File tree

3 files changed

+6
-18
lines changed

3 files changed

+6
-18
lines changed

.github/workflows/build.yml

+2-9
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,11 @@ jobs:
1111

1212
- name: Use Node.js
1313
uses: actions/setup-node@v3
14-
15-
- name: Cache dependencies
16-
uses: actions/cache@v3
1714
with:
18-
path: |
19-
node_modules
20-
*/*/node_modules
21-
key: ${{ runner.os }}-${{ hashFiles('**/package.json', './package.json') }}
22-
id: cache
15+
cache: npm
16+
node-version-file: .nvmrc
2317

2418
- name: Install dependencies
25-
if: steps.cache.outputs.cache-hit != 'true'
2619
run: npm install --prefer-offline
2720

2821
- name: Lint JavaScript files

.github/workflows/commitlint.yml

+4-8
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,13 @@ jobs:
1111
with:
1212
fetch-depth: 0
1313

14-
- name: Cache dependencies
15-
uses: actions/cache@v3
14+
- name: Use Node.js
15+
uses: actions/setup-node@v3
1616
with:
17-
path: |
18-
node_modules
19-
*/*/node_modules
20-
key: ${{ runner.os }}-${{ hashFiles('**/package.json', './package.json') }}
21-
id: cache
17+
cache: npm
18+
node-version-file: .nvmrc
2219

2320
- name: Install dependencies
24-
if: steps.cache.outputs.cache-hit != 'true'
2521
run: npm install --prefer-offline
2622

2723
- name: Lint commit message

.github/workflows/size-limit.yml

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ on:
66
jobs:
77
size:
88
runs-on: ubuntu-latest
9-
timeout-minutes: 5
109
env:
1110
CI_JOB_NUMBER: 1
1211

0 commit comments

Comments
 (0)