Skip to content
This repository has been archived by the owner on Feb 17, 2022. It is now read-only.

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 #72)

Signed-off-by: Jose Benito Gonzalez Lopez <jose.benito.gonzalez@cern.ch>
  • Loading branch information
jbenito3 committed Sep 23, 2015
1 parent 20eb6e8 commit 2e0a854
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .travis.yml
Expand Up @@ -60,6 +60,9 @@ before_script:
- travis_retry pip install kwalitee GitPython --pre # needs recent pep257
- kwalitee check message -s ${TRAVIS_COMMIT_RANGE}
- travis_retry pip install pytest-pep257 # needs older pep257
- travis_retry pip install sphinx
- sphinx-apidoc -f -e -o docs/api/ claimstore
- if [ -n "$(git status -s)" ]; then echo "Mismatch between the output of sphinx-apidoc and the files in docs/api/*. Please, run 'sphinx-apidoc -f -e -o docs/api/ claimstore' and commit/push again." && exit 1; fi

script:
- python setup.py test
Expand Down
6 changes: 6 additions & 0 deletions run-tests.sh
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 output and the actual content of 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 2e0a854

Please sign in to comment.