Skip to content

Commit

Permalink
ci: cache node_modules
Browse files Browse the repository at this point in the history
  • Loading branch information
j4k0xb committed May 25, 2023
1 parent 28145cc commit cd5e842
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,15 @@ jobs:
node-version: '18.x'
registry-url: 'https://registry.npmjs.org'

- name: Cache node modules
id: nodemodules-cache
uses: actions/cache@v3
with:
path: node_modules
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/package-lock.json') }}

- name: Install dependencies
if: steps.nodemodules-cache.outputs.cache-hit != 'true'
run: npm ci

- name: build
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,15 @@ jobs:
node-version: '18.x'
cache: 'npm'

- name: Cache node modules
id: nodemodules-cache
uses: actions/cache@v3
with:
path: node_modules
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/package-lock.json') }}

- name: Install dependencies
if: steps.nodemodules-cache.outputs.cache-hit != 'true'
run: npm ci

- name: Run tests
Expand Down

0 comments on commit cd5e842

Please sign in to comment.