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

Update Node version range in CI, use modern Node version #66

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

rdmurphy
Copy link

@rdmurphy rdmurphy commented Oct 8, 2024

Closes #42.

Hello! I saw the post on Mastodon and the organizing issue and decided to try and help if I can! I did a few things here, mostly with the goal of establishing a solid foundation for testing future changes against modern versions of Node.

  • Happy to undo this, but I've made the CI action run against every commit instead of just master and PRs against master. I think this will put the matrix testing to better use (and because PRs are made of commits, those will still get tested!)
  • I've bumped the matrix up to v18, v20 and v22. v20 is the current LTS version, but it goes into maintenance mode in 15 days and v22 will take its place.
  • I've updated the action versions, and now actions/setup-node@v4 will use caching to speed up installs.
  • I've bumped the working version of Node to v22 in the project. Could see an argument for using v20 instead, but did so for the same reason as above!
  • The package-lock.json appeared to be out of sync because every install would update it locally. I updated the CI command to use npm ci instead of npm install which would catch this mismatch. Definitely some dependencies that could stand to be updated, but all tests are passing, which is nice.

If any/all of this doesn't feel like it makes sense, just let me know! (Or feel free to close it if I'm way off base.)

@RoelN
Copy link
Contributor

RoelN commented Oct 8, 2024

Thank you @rdmurphy!

@Ryuno-Ki, can I bother you for a quick review? It looks good to me and it makes sense, but I'd appreciate another pair of eyes on this!

Copy link

@Ryuno-Ki Ryuno-Ki left a comment

Choose a reason for hiding this comment

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

Should work. My security hat has some additional ideas, that shouldn't block this PR from being merged.

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@v4
Copy link

Choose a reason for hiding this comment

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

Nitpick: While this would work (and is pretty common) I personally prefer to have the whole SemVer in my workflows as this eases an (security) audit.


jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [12.x, 14.x]
node-version: [18, 20, 22]
Copy link

Choose a reason for hiding this comment

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

It might help to drop a link to https://github.com/actions/runner-images#support-policy as comment before.

@RoelN
Copy link
Contributor

RoelN commented Oct 8, 2024

@rdmurphy If you agree with those suggestions, then I'll wait for the changes and then we can merge this puppy! 🐶

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.

Drop old Node support?
3 participants