From 45cf05746dffcd140dadb008b8aad531c1f1e87d Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Fri, 2 Jun 2017 00:12:27 -0400 Subject: [PATCH] Revise Travis scripts, and use only Node 8 --- .travis.yml | 4 +--- deploy/deploy.sh | 14 ++++++-------- deploy/test.sh | 16 +++------------- 3 files changed, 10 insertions(+), 24 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7c558aab..1a32d6a9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,5 @@ language: node_js node_js: - - "6" - - "7" - "8" cache: directories: @@ -11,7 +9,7 @@ script: bash ./deploy/test.sh jobs: include: - stage: build - node_js: "6" + node_js: "8" script: bash ./deploy/deploy.sh env: global: diff --git a/deploy/deploy.sh b/deploy/deploy.sh index d12ee608..fe9f1ab1 100644 --- a/deploy/deploy.sh +++ b/deploy/deploy.sh @@ -3,11 +3,6 @@ set -e -function build { - npm run docs - VERSIONED=false npm run webpack -} - # For revert branches, do nothing if [[ "$TRAVIS_BRANCH" == revert-* ]]; then echo -e "\e[36m\e[1mBuild triggered for reversion branch \"${TRAVIS_BRANCH}\" - doing nothing." @@ -31,13 +26,16 @@ else SOURCE_TYPE="branch" fi -# For Node != 6, do nothing -if [ "$TRAVIS_NODE_VERSION" != "6" ]; then +# For Node != 8, do nothing +if [ "$TRAVIS_NODE_VERSION" != "8" ]; then echo -e "\e[36m\e[1mBuild triggered with Node v${TRAVIS_NODE_VERSION} - doing nothing." exit 0 fi -build +# Run the build +npm run docs +VERSIONED=false npm run webpack + # Initialise some useful variables REPO=`git config remote.origin.url` diff --git a/deploy/test.sh b/deploy/test.sh index 9e076a4c..52812d4e 100644 --- a/deploy/test.sh +++ b/deploy/test.sh @@ -2,12 +2,6 @@ set -e -function tests { - npm run lint - npm run docs:test - exit 0 -} - # For revert branches, do nothing if [[ "$TRAVIS_BRANCH" == revert-* ]]; then echo -e "\e[36m\e[1mTest triggered for reversion branch \"${TRAVIS_BRANCH}\" - doing nothing." @@ -16,8 +10,7 @@ fi # For PRs if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then - echo -e "\e[36m\e[1mTest triggered for PR #${TRAVIS_PULL_REQUEST} to branch \"${TRAVIS_BRANCH}\" - only running tests." - tests + echo -e "\e[36m\e[1mTest triggered for PR #${TRAVIS_PULL_REQUEST}." fi # Figure out the source of the test @@ -27,8 +20,5 @@ else echo -e "\e[36m\e[1mTest triggered for branch \"${TRAVIS_BRANCH}\"." fi -# For Node != 6 -if [ "$TRAVIS_NODE_VERSION" != "6" ]; then - echo -e "\e[36m\e[1mTest triggered with Node v${TRAVIS_NODE_VERSION} - only running tests." - tests -fi +# Run the tests +npm test