Skip to content

Commit d6660d6

Browse files
committed
ci(#43): using npm to cache and cached modules
1 parent e11165a commit d6660d6

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

.github/workflows/node.js.yml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,23 @@ jobs:
2424
uses: actions/setup-node@v1
2525
with:
2626
node-version: ${{ matrix.node-version }}
27-
- run: yarn && yarn test:clean
27+
# - run: yarn && yarn test:clean
28+
- name: Cache node modules
29+
uses: actions/cache@v2
30+
env:
31+
cache-name: cache-node-modules
32+
with:
33+
# npm cache files are stored in `~/.npm` on Linux/macOS
34+
path: ~/.npm
35+
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
36+
restore-keys: |
37+
${{ runner.os }}-build-${{ env.cache-name }}-
38+
${{ runner.os }}-build-
39+
${{ runner.os }}-
40+
- name: Install dependencies
41+
run: |
42+
npm i jest typescript rollup typedoc -g
43+
npm ci
44+
- name: Test coverage
45+
run: |
46+
npm run test:clean

0 commit comments

Comments
 (0)