@@ -30,12 +30,6 @@ matrix:
30
30
- python : 3.4
31
31
dist : trusty
32
32
sudo : false
33
- - python : 2.7
34
- env :
35
- - COVERAGE=1
36
- - python : 3.5
37
- env :
38
- - COVERAGE=1
39
33
# Absolute minimum dependencies
40
34
- python : 2.7
41
35
env :
@@ -99,25 +93,20 @@ matrix:
99
93
env :
100
94
- OPTIONAL_DEPENDS="indexed_gzip"
101
95
before_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
105
98
- virtualenv --python=python venv
106
99
- source venv/bin/activate
107
100
- 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
109
103
- if [ "${CHECK_TYPE}" == "test" ]; then
110
- retry pip install nose mock;
104
+ travis_retry pip install nose mock;
111
105
fi
112
106
- 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;
120
108
fi
109
+ - travis_retry pip install $EXTRA_PIP_FLAGS $DEPENDS $OPTIONAL_DEPENDS
121
110
# command to install dependencies
122
111
install :
123
112
- |
@@ -128,7 +117,6 @@ install:
128
117
python setup_egg.py sdist
129
118
pip install $EXTRA_PIP_FLAGS dist/*.tar.gz
130
119
elif [ "$INSTALL_TYPE" == "wheel" ]; then
131
- pip install wheel
132
120
python setup_egg.py bdist_wheel
133
121
pip install $EXTRA_PIP_FLAGS dist/*.whl
134
122
elif [ "$INSTALL_TYPE" == "requirements" ]; then
@@ -146,7 +134,9 @@ script:
146
134
elif [ "${CHECK_TYPE}" == "import" ]; then
147
135
# Import nibabel without attempting to test
148
136
# 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
150
140
elif [ "${CHECK_TYPE}" == "doc_doctests" ]; then
151
141
cd doc
152
142
pip install -r ../doc-requirements.txt
@@ -156,16 +146,18 @@ script:
156
146
# Change into an innocuous directory and find tests from installation
157
147
mkdir for_testing
158
148
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
164
151
else
165
152
false
166
153
fi
167
154
after_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
169
161
170
162
notifications :
171
163
webhooks : http://nipy.bic.berkeley.edu:54856/travis
0 commit comments