Skip to content

Commit af79c96

Browse files
author
Peter Bengtsson
authored
npm install is faster than npm ci (#33459)
1 parent e78eb19 commit af79c96

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

.github/workflows/code-lint.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ on:
1818
- .eslintrc.cjs
1919
# In case something like eslint or tsc or prettier upgrades
2020
- 'package-lock.json'
21+
# In case one of the script definitions changed
22+
- 'package.json'
2123
# Ultimately, for debugging this workflow itself
2224
- .github/workflows/code-lint.yml
2325

@@ -37,14 +39,20 @@ jobs:
3739
- name: Check out repo
3840
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
3941

42+
- name: Cache node_modules
43+
uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7
44+
with:
45+
path: node_modules
46+
key: ${{ runner.os }}-node_modules-${{ hashFiles('package*.json') }}
47+
4048
- name: Setup node
4149
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516
4250
with:
4351
node-version: '16.17.0'
4452
cache: npm
4553

4654
- name: Install dependencies
47-
run: npm ci
55+
run: npm install --prefer-offline --no-audit --ignore-scripts
4856

4957
- name: Run linter
5058
run: npm run lint

0 commit comments

Comments
 (0)