From 5f719d19ebe22be504d858faf4ac83c13a9a4043 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Thu, 9 Oct 2014 22:04:42 -0500 Subject: [PATCH] Put the whole script in an sh file --- .travis.yml | 20 ++----------------- tools/travis_get_optional.sh | 38 ++++++++++++++++++++++++++++++++++-- tools/travis_setup.sh | 10 +++------- 3 files changed, 41 insertions(+), 27 deletions(-) diff --git a/.travis.yml b/.travis.yml index 47983033..a2fe2e84 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,7 +21,7 @@ before_install: - export WHEELHOUSE="--no-index --find-links=http://wheels.scikit-image.org/" - - travis_retry sh tools/travis_setup.sh + - ./tools/travis_setup.sh install: - tools/header.py "Dependency versions" @@ -30,23 +30,7 @@ install: - python setup.py build_ext --inplace script: - - tools/header.py "Run all tests with minimum dependencies" - - nosetests --exe -v skimage - - - tools/header.py "Pep8 and Flake tests" - - flake8 --exit-zero --exclude=test_*,six.py skimage doc/examples viewer_examples - - - travis_retry sh tools/travis_get_optional.sh - - - tools/header.py "Run doc examples" - - export PYTHONPATH=$(pwd):$PYTHONPATH - - for f in doc/examples/*.py; do python "$f"; if [ $? -ne 0 ]; then exit 1; fi done - - for f in doc/examples/applications/*.py; do python "$f"; if [ $? -ne 0 ]; then exit 1; fi done - - - tools/header.py "Run tests with all dependencies" - # run tests again with optional dependencies to get more coverage - # we get TEST_ARGS from travis_setup.sh - - nosetests --exe -v --with-doctest $TEST_ARGS + - ./tools/travis_test.sh after_success: - coveralls diff --git a/tools/travis_get_optional.sh b/tools/travis_get_optional.sh index ccc297c9..1a3a9a59 100644 --- a/tools/travis_get_optional.sh +++ b/tools/travis_get_optional.sh @@ -1,5 +1,13 @@ -#!/usr/bin/sh -./header.py "Install optional dependencies" +#!/bin/sh +set -ex + +tools/header.py "Run all tests with minimum dependencies" +nosetests --exe -v skimage + +tools/header.py "Pep8 and Flake tests" +flake8 --exit-zero --exclude=test_*,six.py skimage doc/examples viewer_examples + +tools/header.py "Install optional dependencies" # Install Qt and then update the Matplotlib settings if [[ $TRAVIS_PYTHON_VERSION == 2.7* ]]; then @@ -39,3 +47,29 @@ pip install astropy if [[ $TRAVIS_PYTHON_VERSION == 2.* ]]; then pip install pyamg fi + +tools/header.py "Run doc examples" +PYTHONPATH=$(pwd):$PYTHONPATH +for f in doc/examples/*.py; +do python "$f"; + if [ $? -ne 0 ]; then + exit 1; + fi +done + +for f in doc/examples/applications/*.py; +do python "$f"; + if [ $? -ne 0 ]; then + exit 1; + fi +done + +tools/header.py "Run tests with all dependencies" +# run tests again with optional dependencies to get more coverage +if [[ $TRAVIS_PYTHON_VERSION == 3.3 ]]; then + export TEST_ARGS="--with-cov --cover-package skimage" +else + export TEST_ARGS="" +fi +nosetests --exe -v --with-doctest $TEST_ARGS + diff --git a/tools/travis_setup.sh b/tools/travis_setup.sh index 5595f769..9ef667e7 100644 --- a/tools/travis_setup.sh +++ b/tools/travis_setup.sh @@ -1,4 +1,6 @@ -#!/usr/bin/sh +#!/bin/sh +set -ex + pip install wheel flake8 coveralls nose # on Python 2.7, use the system versions of numpy, scipy, and matplotlib @@ -11,9 +13,3 @@ fi pip install -r requirements.txt $WHEELHOUSE python check_bento_build.py - -if [[ $TRAVIS_PYTHON_VERSION == 3.3 ]]; then - export TEST_ARGS="--with-cov --cover-package skimage" -else - export TEST_ARGS="" -fi