diff --git a/.travis.yml b/.travis.yml index 8556fc56..97cf05dd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,7 @@ notifications: env: global: - - TEST_RUN_FOLDER="/tmp" # folder where the tests are run from + - TEST_DIR="/tmp/pastis" # folder where the tests are run from matrix: # Ubuntu 14.04 versions - DISTRIB="conda" PYTHON_VERSION="2.6" @@ -33,11 +33,11 @@ before_script: script: - python continuous_integration/show-python-packages-versions.py # We want to back out of the current working directory to make - # sure we are using nilearn installed in site-packages rather + # sure we are using pastis installed in site-packages rather # than the one from the current working directory # Parentheses (run in a subshell) are used to leave # the current directory unchanged - - make test + - bash continuous_integration/test_script.sh after_success: # Ignore coveralls failures as the coveralls server is not very reliable diff --git a/continuous_integration/install.sh b/continuous_integration/install.sh index 89c18f69..3fd53a18 100755 --- a/continuous_integration/install.sh +++ b/continuous_integration/install.sh @@ -104,3 +104,4 @@ if [[ "$COVERAGE" == "true" ]]; then pip install coverage coveralls fi +python setup.py install diff --git a/continuous_integration/test_script.sh b/continuous_integration/test_script.sh new file mode 100644 index 00000000..848a7678 --- /dev/null +++ b/continuous_integration/test_script.sh @@ -0,0 +1,16 @@ +python --version + +run_tests() { + TEST_CMD="pytest --showlocals --durations=20 --pyargs" + + + mkdir -p $TEST_DIR + cd $TEST_DIR + TEST_CMD="$TEST_CMD --cov pastis" + $TEST_CMD pastis +} + + +if [[ "$SKIP_TESTS" != "true" ]]; then + run_tests +fi