Skip to content

Commit acba5d2

Browse files
committed
MAINT: add doc build to travis test matrix.
Build the docs to check for errors.
1 parent 07b2af7 commit acba5d2

File tree

1 file changed

+27
-11
lines changed

1 file changed

+27
-11
lines changed

.travis.yml

Lines changed: 27 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ cache:
1717
env:
1818
global:
1919
- DEPENDS="numpy scipy sympy matplotlib nibabel"
20-
- INSTALL_TYPE="setup"
20+
- INSTALL_TYPE="pip"
2121
python:
2222
- 3.4
2323
- 3.5
@@ -50,7 +50,12 @@ matrix:
5050
env:
5151
- INSTALL_TYPE=requirements
5252
- DEPENDS=
53-
- python: 3.6
53+
- python: 3.5
54+
env:
55+
- INSTALL_TYPE=setup
56+
- python: 3.5
57+
env:
58+
- DOC_BUILD=1
5459

5560
before_install:
5661
- source tools/travis_tools.sh
@@ -69,11 +74,14 @@ before_install:
6974
pip install coverage;
7075
pip install coveralls codecov;
7176
fi
77+
7278
# command to install dependencies
7379
# e.g. pip install -r requirements.txt # --use-mirrors
7480
install:
7581
- |
76-
if [ "$INSTALL_TYPE" == "setup" ]; then
82+
if [ "$INSTALL_TYPE" == "pip" ]; then
83+
pip install .
84+
elif [ "$INSTALL_TYPE" == "setup" ]; then
7785
python setup.py install
7886
elif [ "$INSTALL_TYPE" == "sdist" ]; then
7987
python setup_egg.py egg_info # check egg_info while we're here
@@ -87,15 +95,23 @@ install:
8795
pip install -r requirements.txt
8896
python setup.py install
8997
fi
90-
# command to run tests, e.g. python setup.py test
98+
99+
# command to run tests
91100
script:
92-
# Change into an innocuous directory and find tests from installation
93-
- mkdir for_testing
94-
- cd for_testing
95-
- if [ "${COVERAGE}" == "1" ]; then
96-
cp ../.coveragerc .;
97-
COVER_ARGS="--with-coverage --cover-package nipy";
101+
- |
102+
if [ "$DOC_BUILD" ]; then # doc build
103+
pip install -r doc-requirements.txt
104+
make html-stamp pdf-stamp
105+
else
106+
# Change into an innocuous directory and find tests from installation
107+
mkdir for_testing
108+
cd for_testing
109+
if [ "${COVERAGE}" == "1" ]; then
110+
cp ../.coveragerc .
111+
COVER_ARGS="--with-coverage --cover-package nipy"
112+
fi
113+
$PYTHON ../tools/nipnost --verbosity=3 $COVER_ARGS nipy
98114
fi
99-
- $PYTHON ../tools/nipnost --verbosity=3 $COVER_ARGS nipy
115+
100116
after_success:
101117
- if [ "${COVERAGE}" == "1" ]; then coveralls; codecov; fi

0 commit comments

Comments
 (0)