Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable caching of npm install/npm ci for setup-node action #1457

Merged
merged 1 commit into from
Apr 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions .github/workflows/check-dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,12 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: 'npm'

- name: Install npm dependencies
run: npm clean-install
- run: npm clean-install

- name: Rebuild the dist/ directory
run: npm run package
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/dependabot-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,14 @@ jobs:
# Check out using a PAT so any pushed changes will trigger checkruns
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was a leftover that I'd forgotten to remove as part of:

So removed it here.

token: ${{ secrets.DEPENDABOT_AUTOBUILD }}

- name: Setup Node.js
uses: actions/setup-node@v4
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: 'npm'

- name: Install npm dependencies
run: npm clean-install
- run: npm clean-install

# If we're reacting to a Docker PR, we have on extra step to refresh and check in the container manifest,
# this **must** happen before rebuilding dist/ so it uses the new version of the manifest
Expand Down
10 changes: 4 additions & 6 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,16 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: 'npm'

- name: Install npm dependencies
run: npm clean-install
- run: npm clean-install

- name: Pre-fetch the pinned images
run: npm run fetch-images -- bundler

- name: Run integration tests
run: npm run test-integration
- run: npm run test-integration
env:
GITHUB_TOKEN: ${{ github.token }}
16 changes: 6 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,15 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: 'npm'

- name: Install npm dependencies
run: npm clean-install
- run: npm clean-install

- name: Check formatting
run: npm run format-check
- run: npm run format-check

- name: Run linter
run: npm run lint-check
- run: npm run lint-check

- name: Run tests
run: npm run test
- run: npm run test
Loading