Skip to content

Commit

Permalink
Infrastructure: Use npm cache in setup-node (#2084)
Browse files Browse the repository at this point in the history
- Add the action to all jobs using `npm ci`
- Unpin from a version to the main `@2` to avoid churn till the next major version
  • Loading branch information
nschonni authored Nov 2, 2021
1 parent 8bb5438 commit 7d94adb
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/coverage-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ jobs:
with:
ref: refs/pull/${{ github.event.pull_request.number }}/head

- name: Set up Node.js
uses: actions/setup-node@v2
with:
cache: npm

- name: Install dependencies
run: npm ci

Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v2
with:
cache: npm

- name: Install dependencies
run: npm ci

Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/lint-css.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ jobs:
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/[email protected]
uses: actions/setup-node@v2
with:
cache: npm

- uses: xt0rted/stylelint-problem-matcher@v1

Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/lint-html.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ jobs:
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/[email protected]
uses: actions/setup-node@v2
with:
cache: npm

- name: Install npm dependencies
run: npm ci
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/lint-js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ jobs:
# setup-node task is used without a particular version in order to load
# the ESLint problem matchers
- name: Set up Node.js
uses: actions/[email protected]
uses: actions/setup-node@v2
with:
cache: npm

- name: Install npm dependencies
run: npm ci
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/regression.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ jobs:
fetch-depth: 0

- name: Set up Node.js
uses: actions/[email protected]
uses: actions/setup-node@v2
with:
cache: npm

- name: Install npm dependencies
run: npm ci
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/spelling.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ jobs:
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/[email protected]
uses: actions/setup-node@v2
with:
cache: npm

- name: Install npm dependencies
run: npm ci
Expand Down

0 comments on commit 7d94adb

Please sign in to comment.