Skip to content

Commit

Permalink
tests: check sphinx-apidoc output
Browse files Browse the repository at this point in the history
* Checks that `spinhx-apidoc` has been run and the output matches what
  is in `docs/api/*`. (closes inveniosoftware#72)

Signed-off-by: Jose Benito Gonzalez Lopez <jose.benito.gonzalez@cern.ch>
  • Loading branch information
jbenito3 committed Sep 22, 2015
1 parent 20eb6e8 commit 386d2c3
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ before_install:
TRAVIS_COMMIT_RANGE=$PR_FIRST^..$TRAVIS_COMMIT
fi
- echo ${TRAVIS_COMMIT_RANGE}
- |
sphinx-apidoc -f -e -o docs/api/ claimstore
if [ -n "$(git status -s)" ]; then
echo "sphinx-apidoc and docs/api/* mismatch"
exit 1
fi
install:
- travis_retry pip install --upgrade pip
Expand Down
2 changes: 1 addition & 1 deletion docs/api/claimstore.app.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
claimstore.app module
xlaimstore.app module
=====================

.. automodule:: claimstore.app
Expand Down
6 changes: 6 additions & 0 deletions run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307,
# USA.

sphinx-apidoc -f -e -o docs/api/ claimstore
if [ -n "$(git status -s)" ]; then
echo
echo "ERROR: there is a mismatch between sphinx-apidoc and docs/api. Check 'git status'."
exit 1
fi
sphinx-build -qnNW docs docs/_build/html
python setup.py test
sphinx-build -qnNW -b doctest docs docs/_build/doctest

0 comments on commit 386d2c3

Please sign in to comment.