ci: enable caching of npm modules

Note: `npm ci` is always required because it's the npm cache that is cached, not the node_modules/ directory.

Reference: https://github.com/actions/setup-node
This commit is contained in:
Damien Arrachequesne
2026-04-02 11:47:54 +02:00
parent 85b26e5c99
commit 4f7edb46ec
4 changed files with 4 additions and 0 deletions

View File

@@ -37,6 +37,7 @@ jobs:
uses: actions/setup-node@v6
with:
node-version: 20
cache: npm
- name: Build ${{ matrix.example }}
run: |

View File

@@ -26,6 +26,7 @@ jobs:
uses: actions/setup-node@v6
with:
node-version: 20
cache: npm
- name: Install dependencies
run: npm ci

View File

@@ -55,6 +55,7 @@ jobs:
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
cache: npm
- name: Install dependencies
run: npm ci

View File

@@ -24,6 +24,7 @@ jobs:
with:
node-version: 24
registry-url: 'https://registry.npmjs.org'
cache: npm
- name: Install dependencies
run: npm ci