Skip to content

Cache npx-downloaded jscpd in CI integration test#24

Merged
nikhaldi merged 1 commit into
mainfrom
claude/jscpd-ci-cache-tTYkZ
Jun 6, 2026
Merged

Cache npx-downloaded jscpd in CI integration test#24
nikhaldi merged 1 commit into
mainfrom
claude/jscpd-ci-cache-tTYkZ

Conversation

@nikhaldi

@nikhaldi nikhaldi commented Jun 6, 2026

Copy link
Copy Markdown
Owner

The integration test runs npx jscpd@<version> for real, which downloads
and installs the ~22 MB jscpd tree into the npx cache on every cold runner
(~9s vs ~1s warm). setup-node's npm cache is keyed on package-lock.json,
which never changes for jscpd, so it can't keep this warm.

Add a dedicated actions/cache step that persists the npx cache directory,
keyed on OS, node version, and the jscpd DEFAULT_VERSION from src/lib.js.
Bumping the version naturally invalidates the cache.

The integration test runs `npx jscpd@<version>` for real, which downloads
and installs the ~22 MB jscpd tree into the npx cache on every cold runner
(~9s vs ~1s warm). setup-node's npm cache is keyed on package-lock.json,
which never changes for jscpd, so it can't keep this warm.

Add a dedicated actions/cache step that persists the npx cache directory,
keyed on OS, node version, and the jscpd DEFAULT_VERSION from src/lib.js.
Bumping the version naturally invalidates the cache.
@nikhaldi nikhaldi merged commit dcdb50e into main Jun 6, 2026
6 checks passed
@nikhaldi nikhaldi deleted the claude/jscpd-ci-cache-tTYkZ branch June 6, 2026 16:25
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.

2 participants