Skip to content

Commit ccd7845

Browse files
authored
ci(workflow): add cache to workflows using actions/setup-node (#279)
1 parent 0f573f0 commit ccd7845

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

.github/workflows/release.yml

Lines changed: 3 additions & 1 deletion
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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ jobs:
2929
uses: actions/setup-node@v2
3030
with:
3131
node-version: "${{ matrix.node-version }}"
32-
- uses: bahmutov/npm-install@v1
32+
cache: npm
33+
- run: npm ci
3334
- run: "npm run test:ci"
3435
test:
3536
runs-on: ubuntu-latest
@@ -40,5 +41,6 @@ jobs:
4041
uses: actions/setup-node@v2
4142
with:
4243
node-version: "${{ matrix.node-version }}"
43-
- uses: bahmutov/npm-install@v1
44+
cache: npm
45+
- run: npm ci
4446
- run: npm run lint

0 commit comments

Comments
 (0)