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

chore(deps): use npm ci instead of npm-install #1037

Merged
merged 1 commit into from
Sep 18, 2023

Conversation

MikeMcC399
Copy link
Collaborator

This PR replaces the use of the JavaScript action bahmutov/npm-install in several .github/workflows by a call to npm-ci.

Reasons

The JavaScript action bahmutov/npm-install relies on node16, which reached end-of-life on Sep 11, 2023. It is uncertain if there will be a new release to support node20 and it has been more than a year since any maintainer has responded to issues in this repo.

The alternative npm-ci is available for all supported versions of Node.js as part of the npm utility, which is included in all standard GitHub runner images. This is equally fast or sometimes faster than using bahmutov/npm-install.

Impact

  • Removes reliance on end-of-life Node.js 16

  • Removes dependency on bahmutov/npm-install

  • Removes caching of npm modules. Counterintuitively, this does not lengthen the run time of any of the changed actions. In some cases (see below) dealing with cache mechanics using npm-install was taking longer than installing using npm ci without caching.

Typical run times

The following table compares the run times of:

  • npm-install (cache miss)
  • npm-install (cache hit)
  • npm ci (no cache usage)
Workflow npm-install
cache miss
npm-install
cache hit
npm ci
no cache
check-dist.yml 4s 5s 2s
check-markdown.yml 4s 5s 3s
example-wait-on.yml in ping-cli 12s 3s 3s
main.yml 12s 3s 3s

@cypress-app-bot
Copy link

@MikeMcC399 MikeMcC399 marked this pull request as ready for review September 18, 2023 10:34
@nagash77 nagash77 merged commit 1e81873 into cypress-io:master Sep 18, 2023
69 checks passed
@MikeMcC399 MikeMcC399 deleted the replace/npm-install branch September 18, 2023 12:38
Copy link

🎉 This PR is included in version 6.6.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants