Skip to content

Commit

Permalink
Fail early and travis_retry when npm install fails
Browse files Browse the repository at this point in the history
  • Loading branch information
ghostwords committed Jun 7, 2018
1 parent 8c793d6 commit 7504cc7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
8 changes: 6 additions & 2 deletions scripts/run_travis.sh
@@ -1,17 +1,21 @@
#!/bin/bash

# stop on errors (nonzero exit codes)
set -e

toplevel=$(git rev-parse --show-toplevel)
testdir=${toplevel}/tests/selenium

function run_lint {
make -C ${toplevel} lint
make -C "$toplevel" lint
if [ $? != 0 ]; then
echo "Linting errors"
exit 1
fi
}

function run_selenium {
py.test --capture=no --verbose --durations=10 ${testdir} # autodiscover and run the tests
py.test --capture=no --verbose --durations=10 "$testdir" # autodiscover and run the tests
}

if [ "$INFO" == "lint" ]; then
Expand Down
11 changes: 6 additions & 5 deletions scripts/setup_travis.sh
@@ -1,4 +1,8 @@
#!/bin/bash

# stop on errors (nonzero exit codes)
set -e

toplevel=$(git rev-parse --show-toplevel)

function setup_chrome {
Expand Down Expand Up @@ -51,11 +55,8 @@ function browser_setup {
}

function setup_lint {
pushd "$toplevel"
# "--production" to skip installing devDependencies modules
npm install --production
popd

# "--production" to skip installing devDependencies modules
npm install --production
}

# check that the desired browser is present as it might fail to install
Expand Down

0 comments on commit 7504cc7

Please sign in to comment.