Skip to content

Commit

Permalink
AV-2066: Cache node_modules in CI workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
bzar committed Sep 20, 2023
1 parent 8db1c5f commit 00c640a
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
11 changes: 10 additions & 1 deletion .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
11 changes: 10 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 00c640a

Please sign in to comment.