From 4ca211bf5c26864216408fda3f258c94b7083a04 Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Thu, 14 Nov 2019 01:02:49 +0100 Subject: [PATCH] caching tweak --- .github/workflows/test.yml | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1d9c7e9..579c074 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -20,22 +20,25 @@ jobs: - name: Cache node modules uses: actions/cache@v1 with: - path: node_modules - key: ${{ runner.OS }}-build-${{ hashFiles('**/package-lock.json') }} + path: ~/.npm + key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} restore-keys: | - ${{ runner.OS }}-build-${{ env.cache-name }}- - ${{ runner.OS }}-build- - ${{ runner.OS }}- + ${{ runner.os }}-node- + + - name: Cache Gatsby build output + uses: actions/cache@v1 + with: + path: public + key: ${{ runner.os }}-public - name: Install Dependencies - run: | - npm ci + run: npm ci + - name: Test - run: | - npm test + run: npm test + - name: Build - run: | - npm run build --if-present + run: npm run build --if-present env: CI: true GATSBY_GITHUB_TOKEN: ${{ secrets.GATSBY_GITHUB_TOKEN }}