From d114eabfe6189892e0b33dc76d36b6b39ff37b29 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Wed, 15 Jul 2020 10:53:49 +0300 Subject: [PATCH] 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 --- .github/workflows/ci.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c70f192df..ec8eb102c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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