cache node modules in CI

This commit is contained in:
Robin Malfait 2020-08-20 18:26:23 +02:00
parent c16bf207bc
commit f2e622a10a
No known key found for this signature in database
GPG key ID: 92F53D68B9041AFE

View file

@ -23,7 +23,19 @@ jobs:
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- name: Use cached node_modules
id: cache
uses: actions/cache@v1
with:
path: node_modules
key: nodeModules-${{ hashFiles('**/yarn.lock') }}-${{ matrix.node-version }}
restore-keys: |
nodeModules-
- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: npm install
env:
CI: true
- run: npm run prepare
- run: npm test
env: