summaryrefslogtreecommitdiff
path: root/scripts/node/run.sh
blob: 22db3fdeddb7ad5d4b9ea207142fdc400b0b9dff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/env bash

set -e
set -o pipefail

source ./scripts/${TRAVIS_OS_NAME}/setup.sh

BUILDTYPE=${BUILDTYPE:-Release}

################################################################################
# Build
################################################################################

source ~/.nvm/nvm.sh
nvm use $NODE_VERSION

mapbox_time "checkout_styles" \
git submodule update --init styles

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