1616 - DEPENDS="six numpy scipy matplotlib h5py pillow pydicom"
1717 - OPTIONAL_DEPENDS=""
1818 - INSTALL_TYPE="setup"
19+ - CHECK_TYPE="test"
1920 - EXTRA_WHEELS="https://5cf40426d9f06eb7461d-6fe47d9331aba7cd62fc36c7196769e4.ssl.cf2.rackcdn.com"
2021 - PRE_WHEELS="https://7933911d6844c6c53a7d-47bd50c35cd79bd838daf386af554a83.ssl.cf2.rackcdn.com"
2122 - EXTRA_PIP_FLAGS="--find-links=$EXTRA_WHEELS"
@@ -32,10 +33,18 @@ matrix:
3233 - python : 2.7
3334 env :
3435 - COVERAGE=1
36+ - python : 3.5
37+ env :
38+ - COVERAGE=1
3539 # Absolute minimum dependencies
3640 - python : 2.7
3741 env :
3842 - DEPENDS="numpy==1.7.1"
43+ # Absolute minimum dependencies
44+ - python : 2.7
45+ env :
46+ - DEPENDS="numpy==1.7.1"
47+ - CHECK_TYPE="import"
3948 # Absolute minimum dependencies plus oldest MPL
4049 # Check these against:
4150 # nibabel/info.py
@@ -60,10 +69,6 @@ matrix:
6069 - python : 3.5
6170 env :
6271 - EXTRA_PIP_FLAGS="$PRE_PIP_FLAGS"
63- # Documentation doctests
64- - python : 2.7
65- env :
66- - DOC_DOC_TEST=1
6772 - python : 2.7
6873 env :
6974 - INSTALL_TYPE=sdist
@@ -75,13 +80,17 @@ matrix:
7580 - INSTALL_TYPE=requirements
7681 - python : 2.7
7782 env :
78- - STYLE=1
83+ - CHECK_TYPE="style"
7984 - python : 3.5
8085 env :
81- - STYLE=1
86+ - CHECK_TYPE="style"
87+ # Documentation doctests
88+ - python : 2.7
89+ env :
90+ - CHECK_TYPE="doc_doctests"
8291 - python : 3.5
8392 env :
84- - DOC_DOC_TEST=1
93+ - CHECK_TYPE="doc_doctests"
8594 # Run tests with indexed_gzip present
8695 - python : 2.7
8796 env :
@@ -97,7 +106,12 @@ before_install:
97106 - source venv/bin/activate
98107 - python --version # just to check
99108 - pip install -U pip setuptools>=27.0 wheel
100- - retry pip install nose flake8 mock # always
109+ - if [ "${CHECK_TYPE}" == "test" ]; then
110+ retry pip install nose mock;
111+ fi
112+ - if [ "${CHECK_TYPE}" == "style" ]; then
113+ retry pip install flake8;
114+ fi
101115 - pip install $EXTRA_PIP_FLAGS $DEPENDS $OPTIONAL_DEPENDS
102116 - if [ "${COVERAGE}" == "1" ]; then
103117 pip install coverage;
@@ -126,25 +140,29 @@ install:
126140# command to run tests, e.g. python setup.py test
127141script :
128142 - |
129- if [ "${STYLE }" == "1 " ]; then
143+ if [ "${CHECK_TYPE }" == "style " ]; then
130144 # Run styles only on core nibabel code.
131145 flake8 nibabel
132- else
146+ elif [ "${CHECK_TYPE}" == "import" ]; then
147+ # Import nibabel without attempting to test
148+ # Allows us to check missing dependencies masked by testing libraries
149+ python -c 'import nibabel; print(nibabel.__version__)'
150+ elif [ "${CHECK_TYPE}" == "doc_doctests" ]; then
151+ cd doc
152+ pip install -r ../doc-requirements.txt
153+ make html;
154+ make doctest;
155+ elif [ "${CHECK_TYPE}" == "test" ]; then
133156 # Change into an innocuous directory and find tests from installation
134157 mkdir for_testing
135158 cd for_testing
136159 if [ "${COVERAGE}" == "1" ]; then
137160 cp ../.coveragerc .;
138161 COVER_ARGS="--with-coverage --cover-package nibabel";
139162 fi
140- if [ "$DOC_DOC_TEST" == "1" ]; then
141- cd ../doc;
142- pip install -r ../doc-requirements.txt
143- make html;
144- make doctest;
145- else
146- nosetests --with-doctest $COVER_ARGS nibabel;
147- fi
163+ nosetests --with-doctest $COVER_ARGS nibabel;
164+ else
165+ false
148166 fi
149167after_success :
150168 - if [ "${COVERAGE}" == "1" ]; then coveralls; codecov; fi
0 commit comments