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

Bump node versions in CI #716

Merged
merged 4 commits into from
Nov 28, 2023
Merged

Bump node versions in CI #716

merged 4 commits into from
Nov 28, 2023

Conversation

cameel
Copy link
Member

@cameel cameel commented Nov 10, 2023

This bumps all minor versions to latest, and also adds a new run on node:current (which is node 21).

It also bumps node version in Hardhat jobs that were not on current only because at the time of node 17 Hardhat did not work with it.

Truffle does not work with node 21, but is fine with node 20, which is the current lts.

@cameel cameel self-assigned this Nov 10, 2023
@cameel
Copy link
Member Author

cameel commented Nov 10, 2023

BTW, I see we still have a branch called bump-truffle-sample-project-to-node-18, that was apparently created during 0.8.22 release. @nikola-matic I assume it's safe to delete it now?

@cameel
Copy link
Member Author

cameel commented Nov 10, 2023

When we merge this, we should make node-current job mandatory.

I already made slight changes to required jobs:

  • coverage/coveralls for some reason disappeared but there's coverage/coveralls (push) now. This was preventing PRs from passing all of CI. Not sure what happened, but I'm guessing it's just a rename on their side so I changed the requirement to the latter.
  • I made the node 10 and Truffle jobs optional.

Copy link
Member

@r0qs r0qs left a comment

Choose a reason for hiding this comment

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

Nice, just one suggestion. Maybe we could have a docker image parameter, like we have in the solidity repo, but with the default nodejs version set to cimg/node:current so we would only set specific versions where needed and reduce code repetition, since most of the places uses node:current already.

parameters:
  default-nodejs-docker-image:
    type: string
    default: "cimg/node:current"
...
  hardhat-sample-project:
    docker:
      - image: << pipeline.parameters.default-nodejs-docker-image >>

Or even something like:

nodejs-defaults: &nodejs-defaults
  docker:
    - image: cimg/node:current
...
  hardhat-sample-project:
    <<: *nodejs-defaults
    steps:
    ...

@cameel
Copy link
Member Author

cameel commented Nov 24, 2023

Maybe we could have a docker image parameter, like we have in the solidity repo

Not sure it's much of an improvement. We use specific versions only once now and the rest is cimg/node:current, which is already almost like a variable.

In the more repo it makes more sense because versions are long due to the embedded hash.

@r0qs
Copy link
Member

r0qs commented Nov 28, 2023

Maybe we could have a docker image parameter, like we have in the solidity repo

Not sure it's much of an improvement. We use specific versions only once now and the rest is cimg/node:current, which is already almost like a variable.

In the more repo it makes more sense because versions are long due to the embedded hash.

Fair enough. Looks good to me then. And I suspect the hardhat test will fail because of similar problem here: ethereum/solidity#14704. But we can fix that in #717.

@cameel cameel merged commit 689b248 into master Nov 28, 2023
16 checks passed
@cameel cameel deleted the bump-node-versions-in-ci branch November 28, 2023 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants