language: node_js
node_js:
- "node"
- "lts/*"
os:
- linux
- osx
- windows
which runs fine on Linux & OSX, but on Windows it errors out with
$ nvs add lts/*
Downloading bootstrap node from https://nodejs.org/dist/v12.22.2/node-v12.22.2-win-x64.7z
######################################################################## 100.0%
$ nvs use lts/*
The command "nvs use lts/*" failed and exited with 1 during .
Your build has been stopped.
Specified version not found.
To add this version now: nvs add node/lts
What should I put in my .travis.yml to run tests against NodeJS LTS on Windows?
I think node is not a valid name on Windows (which uses a different Node.js version manager) when it comes to Travis.
Remember that nvs add <version> downloads and extracts a requested node version. An added node version is then ready to activate with a USE command.
A version string consists of a complete or partial semantic version number or version label (“lts”, “latest”, “Argon”, etc.), optionally preceded by a remote name, optionally followed by a processor architecture or bitness (x86, x64, 32, 64), separated by slashes. When a partial version matches multiple available versions, the latest version is automatically selected. Examples: node/lts, 4.6.0, 6/x86, node/6.7/x64. An alias may also be used in place of a version string.
A remote name is one of the keys from the remotes mapping in $NVS_HOME/settings.json; these may be managed using the nvs remote command.
What I would like to know is what I should put into my .travis.yml file to run tests against latest stable Node.js and latest LTS Node.js on Linux, OSX, and Windows?
Previously, this used to work:
language: node_js
node_js:
- "node"
- "lts/*"
os:
- linux
- osx
- windows
Would I need to break the .travis.yml up into separate sections because nvs (on Windows) uses different names to nvm (on Linux/OSX)?