summaryrefslogtreecommitdiff
path: root/platform/node/scripts/run.sh
diff options
context:
space:
mode:
Diffstat (limited to 'platform/node/scripts/run.sh')
-rwxr-xr-xplatform/node/scripts/run.sh31
1 files changed, 31 insertions, 0 deletions
diff --git a/platform/node/scripts/run.sh b/platform/node/scripts/run.sh
new file mode 100755
index 0000000000..07395d6a69
--- /dev/null
+++ b/platform/node/scripts/run.sh
@@ -0,0 +1,31 @@
+#!/usr/bin/env bash
+
+set -e
+set -o pipefail
+
+source ./platform/${TRAVIS_OS_NAME}/scripts/setup.sh
+
+BUILDTYPE=${BUILDTYPE:-Release}
+
+################################################################################
+# Build
+################################################################################
+
+source ~/.nvm/nvm.sh
+nvm use $NODE_VERSION
+
+mapbox_time "compile_program" \
+npm install --build-from-source
+
+################################################################################
+# Test
+################################################################################
+
+# Travis OS X has no GPU
+if [[ ${TRAVIS_OS_NAME} == "linux" ]]; then
+ mapbox_time "run_tests" \
+ npm test
+
+ mapbox_time "run_render_tests" \
+ npm run test-suite
+fi