Update ci.yml (#2866)

Add caching but skip it on Windows due to https://github.com/actions/cache/issues/336

If the issue is fixed, the `if` condition can be removed
This commit is contained in:
XhmikosR 2020-07-15 10:53:49 +03:00 committed by GitHub
parent 917e47ea58
commit d114eabfe6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -36,6 +36,16 @@ jobs:
with:
node-version: ${{ matrix.node }}
- name: Set up npm cache
uses: actions/cache@v2
if: ${{ !startsWith(runner.os, 'windows') }}
with:
path: ~/.npm
key: ${{ runner.os }}-node-v${{ env.node }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}}
restore-keys: |
${{ runner.OS }}-node-v${{ env.node }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
${{ runner.OS }}-node-v${{ env.node }}-
- name: Install npm dependencies
run: npm ci