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

ci: use .node-version to maintain node version #8986

Merged
merged 7 commits into from
Oct 20, 2023

Conversation

Alfred-Skyblue
Copy link
Member

Define Node.js version using environment variables.
https://docs.github.com/en/actions/learn-github-actions/variables

.github/workflows/ci.yml Outdated Show resolved Hide resolved
@github-actions
Copy link

github-actions bot commented Aug 21, 2023

Size Report

Bundles

File Size Gzip Brotli
runtime-dom.global.prod.js 85.9 kB 32.7 kB (+8 B) 29.5 kB
vue.global.prod.js 132 kB 49.3 kB (+7 B) 44.3 kB

Usages

Name Size Gzip Brotli
createApp 47.9 kB 18.8 kB 17.2 kB
createSSRApp 50.6 kB 19.9 kB (+2 B) 18.2 kB
defineCustomElement 50.3 kB 19.6 kB (+1 B) 17.9 kB
overall 61.2 kB 23.7 kB (+3 B) 21.6 kB

@Alfred-Skyblue Alfred-Skyblue requested a review from sxzz August 21, 2023 11:11
.github/workflows/canary.yml Outdated Show resolved Hide resolved
@sxzz sxzz added the ready to merge The PR is ready to be merged. label Aug 21, 2023
haoqunjiang
haoqunjiang previously approved these changes Sep 14, 2023
@haoqunjiang haoqunjiang dismissed their stale review September 21, 2023 08:24

Maybe not suitable for CI

@haoqunjiang haoqunjiang added need discussion and removed ready to merge The PR is ready to be merged. labels Sep 21, 2023
@haoqunjiang
Copy link
Member

I'm now hesitant about this change. Because I recall a previous bugfix in the ecosystem-ci repo: vuejs/ecosystem-ci@09ddbf8
Considering that even minor Node.js releases could bring trouble to our CI, it isn't a good idea to let the Node.js major version silently bump according to a certain schedule that is out of our control.
Because: 1. we need consistency in our CI; 2. silent version bumps could result in subtle bugs we can't easily identify.

@haoqunjiang
Copy link
Member

Now that Renovate is configured for this repo, I think we can also use it for automatic Node.js version updates.

Currently, Renovate doesn't detect the node-version string in GitHub Actions by default. But there are 2 possible workarounds:

  1. Use regexManagers: Renovate doesn't update NodeJS version used by GitHub actions renovatebot/renovate#7716 (comment)
  2. Use a .node-version file in the project root. It is a widely-supported file format with the exception of nvm (but I wouldn't recommend anyone using nvm in most cases anyway, considering its slowness and being tightly coupled to the shell). Renovate also supports it: https://docs.renovatebot.com/node/#file-support

Personally, I prefer the 2nd option. What do you think?

@Alfred-Skyblue
Copy link
Member Author

Agreed, I also think the second approach is indeed better, we can use .node-version file to manage the Node.js version.

@haoqunjiang haoqunjiang changed the title ci: define Node version using environment variables ci: use .node-version to maintain node version Sep 21, 2023
@sxzz sxzz added ready to merge The PR is ready to be merged. scope: infra and removed need discussion labels Sep 21, 2023
@netlify
Copy link

netlify bot commented Oct 20, 2023

Deploy Preview for vue-sfc-playground failed.

Name Link
🔨 Latest commit c24462a
🔍 Latest deploy log https://app.netlify.com/sites/vue-sfc-playground/deploys/653227e521c24c000874def4

.node-version Outdated Show resolved Hide resolved
@yyx990803 yyx990803 merged commit a44c2b8 into vuejs:main Oct 20, 2023
6 of 9 checks passed
@Alfred-Skyblue Alfred-Skyblue deleted the cli-workflows-var branch October 20, 2023 07:49
lumozx pushed a commit to lumozx/core that referenced this pull request Oct 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready to merge The PR is ready to be merged. scope: infra
Projects
Development

Successfully merging this pull request may close these issues.

5 participants