From 9c784e45f1c6e27273049b2aeb421fe0182d1b0e Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Fri, 13 Dec 2019 17:12:03 +0200 Subject: [PATCH] Actions: add npm cache (#29765) --- .github/workflows/test.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 104d9fa222..04dd494854 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -26,6 +26,16 @@ jobs: - run: npm --version - run: java -version + - name: Set up npm cache + uses: actions/cache@v1 + with: + path: ~/.npm + key: ${{ runner.os }}-node-v{{ matrix.node }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}-${{ hashFiles('.github/workflows/test.yml') }} + restore-keys: | + ${{ runner.OS }}-node-v{{ matrix.node }}-${{ env.cache-name }}- + ${{ runner.OS }}-node-v{{ matrix.node }}- + ${{ runner.OS }}- + - name: Install npm dependencies run: npm ci