diff --git a/tox.ini b/tox.ini index 6402496c88..4e081b28bf 100644 --- a/tox.ini +++ b/tox.ini @@ -4,7 +4,7 @@ # and then run "tox" from this directory. [tox] -envlist = py27,py35,flake8,pylint +envlist = py27,py35,flake8,pylint,sphinx skip_missing_interpreters = False [travis] @@ -72,3 +72,28 @@ deps = pylint==2.1.1 commands = python -m pylint --rcfile=.pylintrc -j 0 src/sagemaker + +[testenv:sphinx] +basepython = python3 +changedir = doc +# Based on: https://github.com/rtfd/readthedocs.org/blob/8f0c78dde5edcc85acf90462a8518735a25482d3/readthedocs/doc_builder/python_environments.py#L263 +install_command = python -m pip install --upgrade -I {packages} +# Based on: https://github.com/rtfd/readthedocs.org/blob/8f0c78dde5edcc85acf90462a8518735a25482d3/readthedocs/doc_builder/python_environments.py#L280 +deps = + Pygments==2.2.0 + setuptools<40 + docutils==0.13.1 + mock==1.0.1 + pillow==2.6.1 + alabaster>=0.7,<0.8,!=0.7.5 + commonmark==0.5.4 + recommonmark==0.4.0 + sphinx<1.8 + sphinx-rtd-theme<0.5 + readthedocs-sphinx-ext<0.6 +# pip install requirements.txt is separate as RTD does it in separate steps +# having the requirements.txt installed in deps above results in Double Requirement exception +# https://github.com/pypa/pip/issues/988 +commands = + pip install --exists-action=w -r requirements.txt + sphinx-build -T -W -b html -d _build/doctrees-readthedocs -D language=en . _build/html