-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,5 @@ | ||
version: 2 | ||
|
||
# | ||
# Reusable Snippets! | ||
# | ||
# These are re-used by the various tests below, to avoid repetition. | ||
# | ||
run_install_desired_npm: &run_install_desired_npm | ||
run: | ||
# Due to a bug, npm upgrades from the version of npm that ships with | ||
# Node.js 6 (npm v3.10.10) go poorly and generally causes other problems | ||
# with the environment. Since yarn is already available here we can just | ||
# use that to work-around the issue. It's possible that npm cleanup might | ||
# prevent this from being necessary, but this can be removed once Node 6 is | ||
# no longer being built below. | ||
name: Install npm@5, but with yarn. | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
martijnwalraven
Author
Contributor
|
||
command: sudo yarn global add npm@5 | ||
|
||
# These are the steps used for each version of Node which we're testing | ||
# against. Thanks to YAMLs inability to merge arrays (though it is able | ||
# to merge objects), every version of Node must use the exact same steps, | ||
|
@@ -36,16 +20,12 @@ jobs: | |
# Platform tests, each with the same tests but different platform or version. | ||
# The docker tag represents the Node.js version and the full list is available | ||
# at https://hub.docker.com/r/circleci/node/. | ||
Node.js 6: | ||
docker: [ { image: 'circleci/node:6' } ] | ||
<<: *common_test_steps | ||
|
||
Node.js 8: | ||
docker: [ { image: 'circleci/node:8' } ] | ||
<<: *common_test_steps | ||
|
||
Node.js 9: | ||
docker: [ { image: 'circleci/node:9' } ] | ||
Node.js 10: | ||
docker: [ { image: 'circleci/node:10' } ] | ||
<<: *common_test_steps | ||
|
||
# Other tests, unrelated to typical code tests. | ||
|
@@ -75,11 +55,9 @@ workflows: | |
version: 2 | ||
Build and Test: | ||
jobs: | ||
- Node.js 6: | ||
<<: *ignore_doc_branches | ||
- Node.js 8: | ||
<<: *ignore_doc_branches | ||
- Node.js 9: | ||
- Node.js 10: | ||
<<: *ignore_doc_branches | ||
- Linting: | ||
<<: *ignore_doc_branches | ||
|
@martijnwalraven This code was used to ensure a specific version of
npm
was installed, rather than just the "last version which shipped with a particular version of Node.js".This repository is (now) testing Node.js 8 and Node.js 10, which ship with different versions of
npm
: 8 ships with npm 5.6.0 and 10 ships with 6.1.0. While 6.1.0 is the latest version in the 6-line, npm 5.6.0 was a bit buggy in some regards (5.10.0 is the latestv5
stable
dist-tag now).I would suggest keeping a baseline and expected version of npm on all versions of Node. Even if Node 8 was out of the picture, this would still fail to use the latest "stable" version of
npm
which is often what is desired (and most developers will be on, thanks to the "npm is outdated" banner which most developers have enabled).