From b1ed50d23572571d82f3b2f7610fd85a7108bc3c Mon Sep 17 00:00:00 2001 From: Christopher Blasnik Date: Wed, 4 May 2016 09:58:48 +0200 Subject: [PATCH] tools: update cross-version test to only include node LTS versions --- tools/cross-test.sh | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/tools/cross-test.sh b/tools/cross-test.sh index e364454..52a4de7 100755 --- a/tools/cross-test.sh +++ b/tools/cross-test.sh @@ -1,6 +1,6 @@ #/bin/bash # -# Run tests for all relevant versions of io.js/node.js +# Run tests for all LTS versions of node.js # # nvm # https://github.com/creationix/nvm @@ -8,18 +8,17 @@ # $ git clone https://github.com/creationix/nvm.git ~/.nvm && cd ~/.nvm && git checkout `git describe --abbrev=0 --tags` # $ echo "source ~/.nvm/nvm.sh" >> ~/.bashrc # -# $ nvm install -s 0.10 -# $ nvm install -s 4.1 -# $ nvm install iojs # source ~/.nvm/nvm.sh -nvm use 0.10 -node_modules/.bin/_mocha ./test -nvm use 4.1 -node_modules/.bin/_mocha ./test +declare -a versions=("0.10" "0.12" "4" "6") -nvm use iojs -node_modules/.bin/_mocha ./test +for i in "${versions[@]}" +do + echo "Testing with node v$i" + nvm install $i + npm i + node_modules/.bin/mocha ./test +done