Skip to content

Commit

Permalink
Cache ~/.npm rather than node_modules
Browse files Browse the repository at this point in the history
  • Loading branch information
jantoun-scottlogic committed May 21, 2024
1 parent ee81fe5 commit 9400f5e
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,11 @@ jobs:
with:
node-version: 18
- name: Cache dependencies
id: cache
uses: actions/cache@v4
with:
path: node_modules
path: ~/.npm
key: node-modules-${{ hashFiles('**/package-lock.json') }}
- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: npm ci
- name: Build app
run: npm run build
Expand All @@ -33,13 +31,11 @@ jobs:
with:
node-version: 18
- name: Cache dependencies
id: cache
uses: actions/cache@v4
with:
path: node_modules
path: ~/.npm
key: node-modules-${{ hashFiles('**/package-lock.json') }}
- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: npm ci
- name: Run tests
run: npm test

0 comments on commit 9400f5e

Please sign in to comment.