Skip to content

fix(ci): stop setup-node 7 caching in steps that install no dependencies - #62

Open
aryanjasala wants to merge 1 commit into
mainfrom
fix/setup-node-package-manager-cache
Open

aryanjasala wants to merge 1 commit into
mainfrom
fix/setup-node-package-manager-cache

Conversation

@aryanjasala

Copy link
Copy Markdown
Member

What this PR does

Gets ready for setup-node 7 (Dependabot #54). setup-node 5 and later start caching on their own when package.json names a packageManager, and fail when that lockfile is missing. The three setup-node steps that install no project dependencies now opt out.

Closes

N/A

Changes

  • ci-detect-changes.yml, version-monitor.yml, ci-test-build-artifact.yml: package-manager-cache: false on the setup-node step. The other setup-node steps already set cache: npm with an explicit cache-dependency-path.

How I verified

$ actionlint
$ bin/check-workflows.sh
Workflow/example contract check passed.

Reviewer notes

  • Merge right after fix(deps): bump actions/setup-node from 4.1.0 to 7.1.0 #54. On setup-node 4.1.0, still pinned on main, the new input only produces an "Unexpected input" warning, so merging first is harmless but noisy.
  • Both should land in the same release, so @v1 callers never get setup-node 7 without this.

setup-node 5 and later start caching on their own when package.json
names a packageManager, and fail when that lockfile is missing. The
three setup-node steps that install no project dependencies
(ci-detect-changes, version-monitor, ci-test-build-artifact) now set
package-manager-cache: false, ahead of the setup-node 7 bump (#54).
Copilot AI balanced review requested due to automatic review settings November 5, 2026 10:36

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Copilot review overview

3 open issues
What changed in this PR

Prepares GitHub Actions workflows for actions/setup-node v7 by explicitly opting out of automatic package-manager caching in steps that don’t install project dependencies, avoiding failures when a lockfile is absent.

Changes:

  • Add package-manager-cache: false to actions/setup-node steps that install no project dependencies.
  • Document why caching is disabled (auto-caching behavior + missing lockfile failure mode).
File Description
.github/​workflows/​version-monitor.yml Disables setup-node auto caching for a non-dependency-installing step.
.github/​workflows/​ci-test-build-artifact.yml Disables setup-node auto caching for a non-dependency-installing step.
.github/​workflows/​ci-detect-changes.yml Disables setup-node auto caching for a non-dependency-installing step.

Review effort: Lite

Comment thread .github/workflows/ci-detect-changes.yml Resolved
Comment thread .github/workflows/version-monitor.yml Resolved
@justlevine

Copy link
Copy Markdown
Collaborator

I'm confused by the premise - why do we want to opt-out of package caching? Isn't that like half the reason we use setup-node instead of rolling our own?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants