@@ -30,12 +30,6 @@ matrix:
3030 - python : 3.4
3131 dist : trusty
3232 sudo : false
33- - python : 2.7
34- env :
35- - COVERAGE=1
36- - python : 3.5
37- env :
38- - COVERAGE=1
3933 # Absolute minimum dependencies
4034 - python : 2.7
4135 env :
@@ -99,25 +93,20 @@ matrix:
9993 env :
10094 - OPTIONAL_DEPENDS="indexed_gzip"
10195before_install :
102- - source tools/travis_tools.sh
103- - python -m pip install --upgrade pip
104- - pip install --upgrade virtualenv
96+ - travis_retry python -m pip install --upgrade pip
97+ - travis_retry pip install --upgrade virtualenv
10598 - virtualenv --python=python venv
10699 - source venv/bin/activate
107100 - python --version # just to check
108- - pip install -U pip setuptools>=27.0 wheel
101+ - travis_retry pip install -U pip setuptools>=27.0 wheel
102+ - travis_retry pip install coverage
109103 - if [ "${CHECK_TYPE}" == "test" ]; then
110- retry pip install nose mock;
104+ travis_retry pip install nose mock;
111105 fi
112106 - if [ "${CHECK_TYPE}" == "style" ]; then
113- retry pip install flake8;
114- fi
115- - pip install $EXTRA_PIP_FLAGS $DEPENDS $OPTIONAL_DEPENDS
116- - if [ "${COVERAGE}" == "1" ]; then
117- pip install coverage;
118- pip install coveralls;
119- pip install codecov;
107+ travis_retry pip install flake8;
120108 fi
109+ - travis_retry pip install $EXTRA_PIP_FLAGS $DEPENDS $OPTIONAL_DEPENDS
121110# command to install dependencies
122111install :
123112 - |
@@ -128,7 +117,6 @@ install:
128117 python setup_egg.py sdist
129118 pip install $EXTRA_PIP_FLAGS dist/*.tar.gz
130119 elif [ "$INSTALL_TYPE" == "wheel" ]; then
131- pip install wheel
132120 python setup_egg.py bdist_wheel
133121 pip install $EXTRA_PIP_FLAGS dist/*.whl
134122 elif [ "$INSTALL_TYPE" == "requirements" ]; then
@@ -146,7 +134,9 @@ script:
146134 elif [ "${CHECK_TYPE}" == "import" ]; then
147135 # Import nibabel without attempting to test
148136 # Allows us to check missing dependencies masked by testing libraries
149- python -c 'import nibabel; print(nibabel.__version__)'
137+ printf 'import nibabel\nprint(nibabel.__version__)\n' > import_only.py
138+ cat import_only.py
139+ coverage run import_only.py
150140 elif [ "${CHECK_TYPE}" == "doc_doctests" ]; then
151141 cd doc
152142 pip install -r ../doc-requirements.txt
@@ -156,16 +146,18 @@ script:
156146 # Change into an innocuous directory and find tests from installation
157147 mkdir for_testing
158148 cd for_testing
159- if [ "${COVERAGE}" == "1" ]; then
160- cp ../.coveragerc .;
161- COVER_ARGS="--with-coverage --cover-package nibabel";
162- fi
163- nosetests --with-doctest $COVER_ARGS nibabel;
149+ cp ../.coveragerc .
150+ nosetests --with-doctest --with-coverage --cover-package nibabel nibabel
164151 else
165152 false
166153 fi
167154after_success :
168- - if [ "${COVERAGE}" == "1" ]; then coveralls; codecov; fi
155+ - |
156+ if [ "${CHECK_TYPE}" == "test" ]; then
157+ travis_retry pip install coveralls codecov
158+ coveralls
159+ codecov
160+ fi
169161
170162notifications :
171163 webhooks : http://nipy.bic.berkeley.edu:54856/travis
0 commit comments