From 6433178175903d3c9455a38f99d8fea1c1646e6f Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Fri, 25 Sep 2020 10:30:13 -0400 Subject: [PATCH] consolidate node_modules cache --- .github/workflows/build.yml | 45 +++++++++++++------------------------ 1 file changed, 15 insertions(+), 30 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 57344e2c..a351f6f0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -57,18 +57,13 @@ jobs: shell: pwsh - name: Cache node_modules - id: cache-node-modules uses: actions/cache@v2 with: - path: node_modules - key: node-modules-lin-${{ hashFiles('package-lock.json') }} - - - name: Cache electron-gyp - id: cache-electron-gyp - uses: actions/cache@v2 - with: - path: ~/.electron-gyp - key: electron-gyp-lin-${{ hashFiles('package-lock.json') }} + path: | + ~/.npm + ~/.electron-gyp + node_modules + key: node-modules-${{ runner.os }}-${{ hashFiles('package-lock.json') }} - name: Install Node dependencies run: npm install @@ -134,18 +129,13 @@ jobs: shell: pwsh - name: Cache node_modules - id: cache-node-modules uses: actions/cache@v2 with: - path: node_modules - key: node-modules-win-${{ hashFiles('package-lock.json') }} - - - name: Cache electron-gyp - id: cache-electron-gyp - uses: actions/cache@v2 - with: - path: ~/.electron-gyp - key: electron-gyp-win-${{ hashFiles('package-lock.json') }} + path: | + ~/.npm + ~/.electron-gyp + node_modules + key: node-modules-${{ runner.os }}-${{ hashFiles('package-lock.json') }} - name: Install Node dependencies run: npm install @@ -241,18 +231,13 @@ jobs: shell: pwsh - name: Cache node_modules - id: cache-node-modules uses: actions/cache@v2 with: - path: node_modules - key: node-modules-mac-${{ hashFiles('package-lock.json') }} - - - name: Cache electron-gyp - id: cache-electron-gyp - uses: actions/cache@v2 - with: - path: ~/.electron-gyp - key: electron-gyp-mac-${{ hashFiles('package-lock.json') }} + path: | + ~/.npm + ~/.electron-gyp + node_modules + key: node-modules-${{ runner.os }}-${{ hashFiles('package-lock.json') }} - name: Install Node dependencies run: npm install