Skip to content

Update CI #28082

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

Merged
merged 3 commits into from Oct 24, 2018
Merged

Update CI #28082

merged 3 commits into from Oct 24, 2018

Conversation

ghost
Copy link

@ghost ghost commented Oct 23, 2018

Summary

This PR

  • replaces stable with node, is node 11 currently
  • adds node 10
  • drops node 8

Details

Node.js Release

image

Specifying Node.js versions

Specifying Node.js versions #
The easiest way to specify Node.js versions is to use one or more of the latest releases in your .travis.yml:

node latest stable Node.js release
iojs latest stable io.js release
lts/* latest LTS Node.js release

Why Adding “node”?

In short: To fail early for new Node.js releases.

At the time of writing this tutorial, the latest Node.js version is 9.x. That means Travis runs tests with the same environment for the configured versions 9 and node. Both run Node.js v9.

In some months, there will be a Node.js v10 release. At that point, the node config points to version 10 instead of 9.

While updating a project you’ll see at an early stage whether it's compatible with the new Node.js major release.

There’s no additional configuration required to test against the next Node.js release. It’s an early heads up for required maintenance.

Eventually you should add the related Node.js version represented by node to your .travis.yml. For an early heads up, it’s a great way to recognize failing tests.

Should You Worry About the Testing Overhead?

As mentioned above, most of the time you’re running tests against the same versions when using a dedicated version number (like 9) and node. This will test your project twice against the same environment.

Well, for us it’s worth testing a repository against the same Node.js twice for most of the time, because testing is cheap.

Be proactive in testing rather than running behind compatibility and needing manual work to test against the latest stable release.

@j-oliveras
Copy link
Contributor

Currently stable and 10 are the same node version.

@ghost ghost changed the title Add node version 10 for ci Refactor ci file Oct 23, 2018
@ghost
Copy link
Author

ghost commented Oct 23, 2018

@j-oliveras
In my opinion, I think it's safer to add node 10.
stable(node) is node 10 now but it is going to be changed at some point.

Check this out: https://futurestud.io/tutorials/node-js-why-you-should-add-node-in-your-travis-config

@ghost ghost changed the title Refactor ci file Update ci file Oct 23, 2018
@ghost ghost changed the title Update ci file Update CI Oct 23, 2018
@j-oliveras
Copy link
Contributor

They just released node 11 as stable.

@ghost
Copy link
Author

ghost commented Oct 23, 2018

https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V11.md#11.0.0
If the testing overhead is okay, then I will add 11 also

@weswigham
Copy link
Member

Travis is really only tolerable running 3 versions since we only get about 5 concurrent builds. That's why we've just been running latest stable and usually two older LTS.

@ghost
Copy link
Author

ghost commented Oct 24, 2018

@weswigham 10 is now LTS. Should I drop 6?

@weswigham
Copy link
Member

If 6 is still LTS, I think 11/10/6 gets us the best coverage for now, and then we can move 6 to 8 once 6 falls out of LTS.

@ghost
Copy link
Author

ghost commented Oct 24, 2018

@weswigham Got it. I dropped node 8.

@ghost ghost mentioned this pull request Oct 24, 2018
@sandersn
Copy link
Member

I'll merge after master passes tests with node 11 (from #28108)

@sandersn sandersn merged commit 6409195 into microsoft:master Oct 24, 2018
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.

3 participants