Skip to content

Commit

Permalink
Add Sphinx doc building to Travis
Browse files Browse the repository at this point in the history
  • Loading branch information
asmeurer committed Apr 11, 2013
1 parent 73d90bf commit 2e1817c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
5 changes: 5 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,17 @@ matrix:
env: TEST_GMPY="true"
- python: 3.3
env: TEST_GMPY="true"
- python: 2.7
env: TEST_SPHINX="true"
before_install:
- if [[ "${TEST_GMPY}" == "true" ]]; then
sudo apt-get update -qq;
sudo apt-get install -qq libgmp-dev;
pip install "gmpy==1.16";
fi
- if [[ "${TEST_SPHINX}" == "true" ]]; then
pip install sphinx;
fi
install:
- if [[ $TRAVIS_PYTHON_VERSION == '3.2' || $TRAVIS_PYTHON_VERSION == '3.3' ]]; then python bin/use2to3; cd py3k-sympy; fi
- python setup.py install
Expand Down
19 changes: 12 additions & 7 deletions bin/test_travis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,22 @@

set -e

# We change directories to make sure that we test the installed version of
# sympy.
mkdir empty
cd empty
cat << EOF | python
if [[ "${TEST_SPHINX}" == "true" ]]; then
cd doc
make html-errors
else
# We change directories to make sure that we test the installed version of
# sympy.
mkdir empty
cd empty
cat << EOF | python
import sympy
t1=sympy.test()
t2=sympy.doctest()
if not (t1 and t2):
raise Exception('Tests failed')
EOF

cd ..
bin/doctest doc/
cd ..
bin/doctest doc/
fi

0 comments on commit 2e1817c

Please sign in to comment.