Introduce .travis.yml (#19)
authorChris Brody <chris.brody@gmail.com>
Wed, 5 Dec 2018 17:41:21 +0000 (12:41 -0500)
committerGitHub <noreply@github.com>
Wed, 5 Dec 2018 17:41:21 +0000 (12:41 -0500)
from cordova-common, with some changes

Testing of this package on old Node.js versions is included,
since some non-Cordova users may still expect this to work.

nvm install --latest-npm is used for Node.js 0.8, as long as needed;
thanks for guidance:
* https://stackoverflow.com/questions/9755841/how-can-i-change-the-version-of-npm-using-nvm/47519162#47519162
* https://github.com/browserify/browserify/blob/master/.travis.yml

Co-authored-by: Christopher J. Brody <chris.brody@gmail.com>
Co-authored-by: Darryl Pogue <darryl@dpogue.ca>
Co-authored-by: Audrey So <audreyso@apache.org>
Co-authored-by: filmaj <maj.fil@gmail.com>
Co-authored-by: Steve Gill <stevengill97@gmail.com>
.travis.yml [new file with mode: 0644]

diff --git a/.travis.yml b/.travis.yml
new file mode 100644 (file)
index 0000000..ec47926
--- /dev/null
@@ -0,0 +1,28 @@
+language: node_js
+sudo: false
+
+git:
+  depth: 10
+
+node_js:
+  - 0.8
+  - 0.10
+  - 0.12
+  - 4
+  - 6
+  - 8
+  - 10
+
+install:
+  - nvm --version
+  - node --version
+  - npm --version
+  # remaining install steps can be removed once we drop Node.js 0.8 support:
+  - 'if [ "${TRAVIS_NODE_VERSION}" = "0.8" ] ; then nvm install --latest-npm 0.8 ; fi'
+  - npm install
+  - node --version
+  - npm --version
+
+
+script:
+  - npm test