mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-17 20:13:30 +01:00
Add Node 7 testing and prettify output
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
language: node_js
|
language: node_js
|
||||||
node_js:
|
node_js:
|
||||||
- "6"
|
- "6"
|
||||||
|
- "7"
|
||||||
cache:
|
cache:
|
||||||
directories:
|
directories:
|
||||||
- node_modules
|
- node_modules
|
||||||
|
|||||||
@@ -3,26 +3,37 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# Only run tests for PRs
|
function tests {
|
||||||
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
|
|
||||||
echo "deploy.sh: This is a PR build - only running tests"
|
|
||||||
npm run test-docs
|
npm run test-docs
|
||||||
VERSIONED=false npm run web-dist
|
VERSIONED=false npm run web-dist
|
||||||
exit 0
|
exit 0
|
||||||
|
}
|
||||||
|
|
||||||
|
function build {
|
||||||
|
npm run docs
|
||||||
|
VERSIONED=false npm run web-dist
|
||||||
|
}
|
||||||
|
|
||||||
|
# For PRs or Node 7, only run tests
|
||||||
|
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
|
||||||
|
echo -e "\e[36m\e[4m\e[1mThis is a PR build - only running tests"
|
||||||
|
tests
|
||||||
|
fi
|
||||||
|
if [ "$TRAVIS_NODE_VERSION" != "6" ]; then
|
||||||
|
echo -e "\e[36m\e[4m\e[1mThis is a Node v$TRAVIS_NODE_VERSION build - only running tests"
|
||||||
|
tests
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Figure out the source of the build
|
# Figure out the source of the build
|
||||||
if [ -n "$TRAVIS_TAG" ]; then
|
if [ -n "$TRAVIS_TAG" ]; then
|
||||||
echo "deploy.sh: This is a tag build for $TRAVIS_TAG"
|
echo -e "\e[36m\e[4m\e[1mThis is a tag build for $TRAVIS_TAG"
|
||||||
SOURCE=$TRAVIS_TAG
|
SOURCE=$TRAVIS_TAG
|
||||||
else
|
else
|
||||||
echo "deploy.sh: This is a branch build for $TRAVIS_BRANCH"
|
echo -e "\e[36m\e[4m\e[1mThis is a branch build for $TRAVIS_BRANCH"
|
||||||
SOURCE=$TRAVIS_BRANCH
|
SOURCE=$TRAVIS_BRANCH
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Build everything
|
build
|
||||||
npm run docs
|
|
||||||
VERSIONED=false npm run web-dist
|
|
||||||
|
|
||||||
# Initialise some useful variables
|
# Initialise some useful variables
|
||||||
REPO=`git config remote.origin.url`
|
REPO=`git config remote.origin.url`
|
||||||
|
|||||||
Reference in New Issue
Block a user