Revise Travis scripts, and use only Node 8

This commit is contained in:
Schuyler Cebulskie
2017-06-02 00:12:27 -04:00
parent a2520efa1a
commit 45cf05746d
3 changed files with 10 additions and 24 deletions

View File

@@ -1,7 +1,5 @@
language: node_js language: node_js
node_js: node_js:
- "6"
- "7"
- "8" - "8"
cache: cache:
directories: directories:
@@ -11,7 +9,7 @@ script: bash ./deploy/test.sh
jobs: jobs:
include: include:
- stage: build - stage: build
node_js: "6" node_js: "8"
script: bash ./deploy/deploy.sh script: bash ./deploy/deploy.sh
env: env:
global: global:

View File

@@ -3,11 +3,6 @@
set -e set -e
function build {
npm run docs
VERSIONED=false npm run webpack
}
# For revert branches, do nothing # For revert branches, do nothing
if [[ "$TRAVIS_BRANCH" == revert-* ]]; then if [[ "$TRAVIS_BRANCH" == revert-* ]]; then
echo -e "\e[36m\e[1mBuild triggered for reversion branch \"${TRAVIS_BRANCH}\" - doing nothing." echo -e "\e[36m\e[1mBuild triggered for reversion branch \"${TRAVIS_BRANCH}\" - doing nothing."
@@ -31,13 +26,16 @@ else
SOURCE_TYPE="branch" SOURCE_TYPE="branch"
fi fi
# For Node != 6, do nothing # For Node != 8, do nothing
if [ "$TRAVIS_NODE_VERSION" != "6" ]; then if [ "$TRAVIS_NODE_VERSION" != "8" ]; then
echo -e "\e[36m\e[1mBuild triggered with Node v${TRAVIS_NODE_VERSION} - doing nothing." echo -e "\e[36m\e[1mBuild triggered with Node v${TRAVIS_NODE_VERSION} - doing nothing."
exit 0 exit 0
fi fi
build # Run the build
npm run docs
VERSIONED=false npm run webpack
# Initialise some useful variables # Initialise some useful variables
REPO=`git config remote.origin.url` REPO=`git config remote.origin.url`

View File

@@ -2,12 +2,6 @@
set -e set -e
function tests {
npm run lint
npm run docs:test
exit 0
}
# For revert branches, do nothing # For revert branches, do nothing
if [[ "$TRAVIS_BRANCH" == revert-* ]]; then if [[ "$TRAVIS_BRANCH" == revert-* ]]; then
echo -e "\e[36m\e[1mTest triggered for reversion branch \"${TRAVIS_BRANCH}\" - doing nothing." echo -e "\e[36m\e[1mTest triggered for reversion branch \"${TRAVIS_BRANCH}\" - doing nothing."
@@ -16,8 +10,7 @@ fi
# For PRs # For PRs
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then 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." echo -e "\e[36m\e[1mTest triggered for PR #${TRAVIS_PULL_REQUEST}."
tests
fi fi
# Figure out the source of the test # Figure out the source of the test
@@ -27,8 +20,5 @@ else
echo -e "\e[36m\e[1mTest triggered for branch \"${TRAVIS_BRANCH}\"." echo -e "\e[36m\e[1mTest triggered for branch \"${TRAVIS_BRANCH}\"."
fi fi
# For Node != 6 # Run the tests
if [ "$TRAVIS_NODE_VERSION" != "6" ]; then npm test
echo -e "\e[36m\e[1mTest triggered with Node v${TRAVIS_NODE_VERSION} - only running tests."
tests
fi