Skip to content

Commit a4f0ff7

Browse files
authored
ci(workflow): add 'npm' cache for actions/setup-node in .github/workflows (#2038)
1 parent ee3068e commit a4f0ff7

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

.github/workflows/release.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ jobs:
1414
steps:
1515
- uses: actions/checkout@v2
1616
- uses: actions/setup-node@v2
17-
- uses: bahmutov/npm-install@v1
17+
with:
18+
cache: npm
19+
- run: npm ci
1820
- run: npx semantic-release
1921
env:
2022
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/test.yml

+5-2
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,10 @@ jobs:
3131
uses: actions/setup-node@v2
3232
with:
3333
node-version: ${{ matrix.node-version }}
34+
cache: npm
3435
- name: Ensure dependencies are compatible with the version of node
3536
run: echo 'engine-strict=true' >> .npmrc
36-
- uses: bahmutov/npm-install@v1
37+
- run: npm ci
3738
- run: npm run test:ci
3839

3940
# separate job to set as required in branch protection,
@@ -44,5 +45,7 @@ jobs:
4445
steps:
4546
- uses: actions/checkout@v2
4647
- uses: actions/setup-node@v2
47-
- uses: bahmutov/npm-install@v1
48+
with:
49+
cache: npm
50+
- run: npm ci
4851
- run: npm run lint

0 commit comments

Comments
 (0)