Skip to content
This repository was archived by the owner on Jan 11, 2023. It is now read-only.

Commit 938ddb1

Browse files
authored
ci(workflow): add cache to workflows using actions/setup-node (#1787)
1 parent fc1eb3b commit 938ddb1

File tree

1 file changed

+15
-12
lines changed

1 file changed

+15
-12
lines changed

.github/workflows/ci.yml

+15-12
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,21 @@ jobs:
99
node-version: [10, 12, 14]
1010
os: [ubuntu-latest, windows-latest, macOS-latest]
1111
steps:
12-
- run: git config --global core.autocrlf false
13-
- uses: actions/checkout@v2
14-
- uses: actions/setup-node@v1
15-
with:
16-
node-version: ${{ matrix.node-version }}
17-
- run: npm install
18-
- run: npm test
19-
env:
20-
CI: true
12+
- run: git config --global core.autocrlf false
13+
- uses: actions/checkout@v2
14+
- uses: actions/setup-node@v2
15+
with:
16+
node-version: ${{ matrix.node-version }}
17+
cache: npm
18+
- run: npm install
19+
- run: npm test
20+
env:
21+
CI: true
2122
Lint:
2223
runs-on: ubuntu-latest
2324
steps:
24-
- uses: actions/checkout@v2
25-
- uses: actions/setup-node@v1
26-
- run: 'npm i && npm run lint'
25+
- uses: actions/checkout@v2
26+
- uses: actions/setup-node@v2
27+
with:
28+
cache: npm
29+
- run: 'npm i && npm run lint'

0 commit comments

Comments
 (0)