Skip to content

Commit

Permalink
ci: add npm cache in actions/setup-node (#4271)
Browse files Browse the repository at this point in the history
  • Loading branch information
lyzlisa committed Dec 1, 2023
1 parent 6dd075c commit 9e94536
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 3 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,13 @@ jobs:
NPM_CONFIG_UNSAFE_PERM: true
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
cache: 'npm'
cache-dependency-path: |
package-lock.json
node-version: ${{ matrix.node_version }}

- run: npm install -g npm@latest
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ jobs:

- uses: actions/setup-node@v4
with:
cache: 'npm'
cache-dependency-path: |
package-lock.json
node-version: '18'

- name: Install and Build 🔧
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,15 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
cache: 'npm'
cache-dependency-path: |
package-lock.json
node-version: '16'

- uses: actions/checkout@v4

- name: Lint changelog file
uses: avto-dev/markdown-lint@v1
with:
Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ jobs:

- uses: actions/setup-node@v4
with:
cache: 'npm'
cache-dependency-path: |
package-lock.json
node-version: ${{ matrix.node_version }}

- run: npm install -g npm@latest
Expand Down Expand Up @@ -60,6 +63,9 @@ jobs:

- uses: actions/setup-node@v4
with:
cache: 'npm'
cache-dependency-path: |
package-lock.json
node-version: '18'

- run: npm install -g npm@latest
Expand All @@ -86,6 +92,9 @@ jobs:

- uses: actions/setup-node@v4
with:
cache: 'npm'
cache-dependency-path: |
package-lock.json
node-version: 16

- name: Bootstrap
Expand All @@ -107,6 +116,9 @@ jobs:
uses: actions/checkout@v4.0.0
- uses: actions/setup-node@v4
with:
cache: 'npm'
cache-dependency-path: |
package-lock.json
node-version: 16

- name: Bootstrap
Expand Down Expand Up @@ -134,6 +146,9 @@ jobs:

- uses: actions/setup-node@v4
with:
cache: 'npm'
cache-dependency-path: |
package-lock.json
node-version: ${{ matrix.node_version }}

- name: Build
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/w3c-integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ jobs:

- uses: actions/setup-node@v4
with:
cache: 'npm'
cache-dependency-path: |
package-lock.json
node-version: '16'

- name: Install and Bootstrap 🔧
Expand Down

0 comments on commit 9e94536

Please sign in to comment.