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 92c8d1c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
5 changes: 3 additions & 2 deletions scripts/run_travis.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
#!/bin/bash

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
8 changes: 3 additions & 5 deletions scripts/setup_travis.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash

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

function setup_chrome {
Expand Down Expand Up @@ -51,11 +52,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 || exit 1
}

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

0 comments on commit 92c8d1c

Please sign in to comment.