cache node_modules in github actions
commit5617a5c9244222b2e530480745192acb37bce4e0
authorMatthew Griffith <mdg.griffith@gmail.com>
dateFri 13 Mar 2020, 21:05 (7 years ago)
parent4b1101d
.github/workflows/tests.yml+12
@@ -24,6 +24,18 @@ jobs:
2424 uses: actions/setup-node@v1
2525 with:
2626 node-version: 10
27+
28+ - name: Cache node modules
29+ uses: actions/cache@v1
30+ env:
31+ cache-name: cache-node-modules
32+ with:
33+ path: ~/.npm # npm cache files are stored in `~/.npm` on Linux/macOS
34+ key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
35+ restore-keys: |
36+ ${{ runner.os }}-build-${{ env.cache-name }}-
37+ ${{ runner.os }}-build-
38+ ${{ runner.os }}-
2739
2840 - name: Install
2941 run: npm install