diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index f3771ae635..4fe2e41160 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -95,8 +95,17 @@ jobs: cache: 'npm' cache-dependency-path: opendata-assets/package-lock.json + - name: cache node_modules + uses: actions/cache@v3 + id: cache-node_modules + with: + path: node_modules + key: ${{ runner.os }}-build-node_v16-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-build-node_v16- + - name: install npm packages - if: ${{ matrix.build-frontend == true && matrix.build-container == true }} + if: ${{ matrix.build-frontend == true && matrix.build-container == true }} && steps.cache-node_modules.outputs.cache-hit != 'true'}} run: npm ci working-directory: ./opendata-assets diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 253c897832..bcddd60ca7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -114,8 +114,17 @@ jobs: cache: 'npm' cache-dependency-path: opendata-assets/package-lock.json + - name: cache node_modules + uses: actions/cache@v3 + id: cache-node_modules + with: + path: node_modules + key: ${{ runner.os }}-build-node_v16-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-build-node_v16- + - name: install npm packages - if: ${{ matrix.build-frontend == true && matrix.build-container == true }} + if: ${{ matrix.build-frontend == true && matrix.build-container == true && steps.cache-node_modules.outputs.cache-hit != 'true' }} run: npm ci working-directory: ./opendata-assets