Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#766] Stop Travis build if a dependency install fails
To do so, I needed to split our ./bin/travis-build in two files, one with the deps install, and one with the test run. Doing so allows me to use the "install" directive in Travis, and break the build as soon as something fails with it.
- Loading branch information
1 parent
2ce2164
commit 3a60c2e
Showing
3 changed files
with
28 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/bash | ||
|
||
# Run mocha front-end tests | ||
# We need ckan to be running for some tests | ||
paster serve test-core.ini & | ||
sleep 5 # Make sure the server has fully started | ||
mocha-phantomjs http://localhost:5000/base/test/index.html | ||
# Did an error occur? | ||
MOCHA_ERROR=$? | ||
# We are done so kill ckan | ||
killall paster | ||
|
||
# And finally, run the nosetests | ||
nosetests --ckan --with-pylons=test-core.ini --nologcapture ckan ckanext | ||
# Did an error occur? | ||
NOSE_ERROR=$? | ||
|
||
[ "0" -ne "$MOCHA_ERROR" ] && echo MOCKA tests have failed | ||
[ "0" -ne "$NOSE_ERROR" ] && echo NOSE tests have failed | ||
|
||
# If an error occurred in our tests make sure travis knows | ||
exit `expr $MOCHA_ERROR + $NOSE_ERROR` |