Skip to content

Commit f77b94c

Browse files
committed
TST: Run style tests separately
1 parent ae819f1 commit f77b94c

File tree

1 file changed

+25
-15
lines changed

1 file changed

+25
-15
lines changed

.travis.yml

Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,12 @@ matrix:
5757
- python: 2.7
5858
env:
5959
- INSTALL_TYPE=requirements
60+
- python: 2.7
61+
env:
62+
- STYLE=1
63+
- python: 3.5
64+
env:
65+
- STYLE=1
6066
before_install:
6167
- source tools/travis_tools.sh
6268
- virtualenv --python=python venv
@@ -98,22 +104,26 @@ install:
98104
- export NIBABEL_DATA_DIR="$PWD/nibabel-data"
99105
# command to run tests, e.g. python setup.py test
100106
script:
101-
# Run styles first, only on core nibabel code.
102-
- flake8 nibabel
103-
# Change into an innocuous directory and find tests from installation
104-
- mkdir for_testing
105-
- cd for_testing
106-
- if [ "${COVERAGE}" == "1" ]; then
107-
cp ../.coveragerc .;
108-
COVER_ARGS="--with-coverage --cover-package nibabel";
109-
fi
110-
- if [ "$DOC_DOC_TEST" == "1" ]; then
111-
pip install sphinx numpydoc texext;
112-
cd ../doc;
113-
make html;
114-
make doctest;
107+
- |
108+
if [ "${STYLE}" == "1" ]; then
109+
# Run styles only on core nibabel code.
110+
flake8 nibabel
115111
else
116-
nosetests --with-doctest $COVER_ARGS nibabel;
112+
# Change into an innocuous directory and find tests from installation
113+
mkdir for_testing
114+
cd for_testing
115+
if [ "${COVERAGE}" == "1" ]; then
116+
cp ../.coveragerc .;
117+
COVER_ARGS="--with-coverage --cover-package nibabel";
118+
fi
119+
if [ "$DOC_DOC_TEST" == "1" ]; then
120+
pip install sphinx numpydoc texext;
121+
cd ../doc;
122+
make html;
123+
make doctest;
124+
else
125+
nosetests --with-doctest $COVER_ARGS nibabel;
126+
fi
117127
fi
118128
after_success:
119129
- if [ "${COVERAGE}" == "1" ]; then coveralls; fi

0 commit comments

Comments
 (0)