diff --git a/.travis.yml b/.travis.yml index d9cda5715..80bf9ba10 100644 --- a/.travis.yml +++ b/.travis.yml @@ -32,6 +32,7 @@ env: - RUN_DOCS="false" - TEST_OPTIONS="" - RUSTFLAGS="-D warnings" + - TRAVIS_NODE_VERSION="6" # GH_TOKEN for documentation - secure: bumJASbZSU8bxJ0EyPUJmu16AiV9EXOpyOj86Jlq/Ty9CfwGqsSXt96uDyE+OUJf34RUFQMsw0nk37/zC4lcn6kqk2wpuH3N/o85Zo/cVZY/NusBWLQqtT5VbYWsV+u2Ua4Tmmsw8yVYQhYwU2ZOejNpflL+Cs9XGgORp1L+/gMRMC2y5Se6ZhwnKPQlRJ8LGsG1dzjQULxzADIt3/zuspNBS8a2urJwlHfGMkvHDoUWCviP/GXoSqw3TZR7FmKyxE19I8n9+iSvm9+oZZquvcgfUxMHn8Gq/b44UbPvjtFOg2yam4xdWXF/RyWCHdc/R9EHorSABeCbefIsm+zcUF3/YQxwpSxM4IZEeH2rTiC7dcrsKw3XsO16xFQz5YI5Bay+CT/wTdMmJd7DdYz7Dyf+pOvcM9WOf/zorxYWSBOMYy0uzbusU2iyIghQ82s7E/Ahg+WARtPgkuTLSB5aL1oCTBKHqQscMr7lo5Ti6RpWLxEdTQMBznc+bMr+6dEtkEcG9zqc6cE9XX+ox3wTU6+HVMfQ1ltCntJ4UKcw3A6INEbw9wgocQa812CIASQ2fE+SCAbz6JxBjIAlFUnD1lUB7S8PdMPwn9plfQgKQ2A5YZqg6FnBdf0rQXIJYxQWKHXj/rBHSUCT0tHACDlzTA+EwWggvkP5AGIxRxm8jhw= - KCOV_CMD="./kcov-master/tmp/usr/local/bin/kcov" @@ -41,6 +42,7 @@ cache: directories: - $TRAVIS_BUILD_DIR/target - $TRAVIS_BUILD_DIR/kcov-master + - $TRAVIS_BUILD_DIR/js/node_modules - $HOME/.cargo addons: @@ -64,9 +66,14 @@ install: make && make install DESTDIR=../tmp && cd ) + - nvm install $TRAVIS_NODE_VERSION && nvm use $TRAVIS_NODE_VERSION && ./js/scripts/install-deps.sh script: - - if [ "$RUN_TESTS" = "true" ]; then ./test.sh $TEST_OPTIONS --verbose; fi + - if [ "$RUN_TESTS" = "true" ]; then + ./js/scripts/lint.sh && + ./js/scripts/test.sh && + ./test.sh $TEST_OPTIONS --verbose; + fi - if [ "$RUN_COVERAGE" = "true" ]; then ./scripts/cov.sh "$KCOV_CMD"; fi after_success: | diff --git a/js/scripts/install-deps.sh b/js/scripts/install-deps.sh index 67113f27e..96c2f36b1 100755 --- a/js/scripts/install-deps.sh +++ b/js/scripts/install-deps.sh @@ -6,6 +6,8 @@ cd .. # install deps and store the exit code EXITCODE=0 +node --version +npm --version npm install --progress=false || EXITCODE=1 # back to root