-
Notifications
You must be signed in to change notification settings - Fork 28k
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(ci): use nodeVersion with environment variables #74576
base: canary
Are you sure you want to change the base?
Conversation
Allow CI Workflow Run
Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is going in the right direction, thank you. But some semantics are now off.
jobs: | ||
testExamples: | ||
# Don't execute using cron on forks | ||
if: (github.repository == 'vercel/next.js') || (inputs.is_dispatched == true) | ||
if: (github.repository_owner == 'vercel') || (inputs.is_dispatched == true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Matches other checks e.g. in trigger_release 👍🏻
.github/workflows/build_and_test.yml
Outdated
@@ -244,7 +244,7 @@ jobs: | |||
react: [''] | |||
uses: ./.github/workflows/build_reusable.yml | |||
with: | |||
nodeVersion: 18.18.2 | |||
nodeVersion: ${{ env.NODE_LTS_VERSION }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Node.js version has a different meaning here. We want to test with our lowest supported Node.js version not whatever is the highest maintenance release line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh I see. Thanks for your explain.
I fixed that and specify as environment variable with env.NODE_MAINTENANCE_VERSION
.
But I don't know when we can use matrix
and build/test for the every supported node versions like 18
, 20
, 22
.
my changes are only port magic numbers to environment variable and didn't use matrix (:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR shouldn't add matrix testing nor change the used Node.js version
.github/workflows/build_and_test.yml
Outdated
@@ -95,7 +95,7 @@ jobs: | |||
- uses: actions/checkout@v4 | |||
- uses: actions/setup-node@v4 | |||
with: | |||
node-version: 18 | |||
node-version: ${{ env.NODE_LTS_VERSION }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be
node-version: ${{ env.NODE_LTS_VERSION }} | |
nodeVersion: ${{ env.NODE_MAINTENANCE_VERSION }} |
to match the prior behavior. Same for the other instances. I'm all for using named variables over magic numbers but changing the used Node.js version should be in a follow-up in case we need to revert what Node.js version is used.
No description provided.