File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ # cannot use `set -e` because it is incompatible with nvm
3
+
4
+ # download nvm and load it
5
+ export NVM_DIR=" ` pwd` /.nvm" # truly local nvm install not needing sudo
6
+ mkdir -p $NVM_DIR
7
+ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.0/install.sh | bash
8
+ [ -s " $NVM_DIR /nvm.sh" ] && . " $NVM_DIR /nvm.sh"
9
+
10
+ function run_tests () {
11
+ echo " Installing node" $1
12
+ nvm install $1
13
+ nvm exec $1 npm install
14
+ response=$?
15
+ if [[ $response != 0 ]]; then exit $response ; fi
16
+ nvm exec $1 npm test
17
+ response=$?
18
+ if [[ $response != 0 ]]; then exit $response ; fi
19
+ }
20
+
21
+ # install node 5; run tests
22
+ run_tests 5
23
+
24
+ # install node 0.10; run tests
25
+ run_tests 0.10
26
+
27
+ # install node; run tests
28
+ run_tests node
You can’t perform that action at this time.
0 commit comments