mirror of
https://github.com/jupyterhub/the-littlest-jupyterhub.git
synced 2025-12-18 21:54:05 +08:00
Add documentation build to CI, warnings as errors
Adds a CircleCI job to build the documentation and makes it so that sphinx warnings are treated as errors.
This commit is contained in:
@@ -101,9 +101,52 @@ jobs:
|
|||||||
command: |
|
command: |
|
||||||
python3 .circleci/integration-test.py run 'python3 -m pytest -v /srv/src/integration-tests'
|
python3 .circleci/integration-test.py run 'python3 -m pytest -v /srv/src/integration-tests'
|
||||||
|
|
||||||
|
documentation:
|
||||||
|
docker:
|
||||||
|
# Match target OS of TLJH
|
||||||
|
- image: ubuntu:18.04
|
||||||
|
|
||||||
|
working_directory: ~/repo
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
|
||||||
|
# Setup Python
|
||||||
|
- run:
|
||||||
|
name: install python
|
||||||
|
command: |
|
||||||
|
apt-get update --yes && apt-get install --yes python3 python3-venv git
|
||||||
|
|
||||||
|
# Download and cache dependencies
|
||||||
|
- restore_cache:
|
||||||
|
key: v1-dependencies-py3.6-sphinx
|
||||||
|
|
||||||
|
- run:
|
||||||
|
name: Setup venv
|
||||||
|
command: |
|
||||||
|
python3 -m venv /srv/venv
|
||||||
|
echo 'export PATH=/srv/venv/bin:$PATH' >> $BASH_ENV
|
||||||
|
|
||||||
|
- run:
|
||||||
|
name: install dependencies
|
||||||
|
command: |
|
||||||
|
pip install sphinx
|
||||||
|
|
||||||
|
- save_cache:
|
||||||
|
paths:
|
||||||
|
- /srv/venv/
|
||||||
|
key: v1-dependencies-py3.6-sphinx
|
||||||
|
|
||||||
|
- run:
|
||||||
|
name: build documentation
|
||||||
|
command: |
|
||||||
|
cd docs
|
||||||
|
make html
|
||||||
|
|
||||||
workflows:
|
workflows:
|
||||||
version: 2
|
version: 2
|
||||||
all-tests:
|
all-tests:
|
||||||
jobs:
|
jobs:
|
||||||
- unit-test
|
- unit-test
|
||||||
- integration-test
|
- integration-test
|
||||||
|
- documentation
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
# You can set these variables from the command line.
|
# You can set these variables from the command line.
|
||||||
SPHINXOPTS =
|
SPHINXOPTS = -W
|
||||||
SPHINXBUILD = sphinx-build
|
SPHINXBUILD = sphinx-build
|
||||||
SPHINXPROJ = TheLittlestJupyterHub
|
SPHINXPROJ = TheLittlestJupyterHub
|
||||||
SOURCEDIR = .
|
SOURCEDIR = .
|
||||||
@@ -17,4 +17,4 @@ help:
|
|||||||
# Catch-all target: route all unknown targets to Sphinx using the new
|
# Catch-all target: route all unknown targets to Sphinx using the new
|
||||||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
|
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
|
||||||
%: Makefile
|
%: Makefile
|
||||||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
||||||
|
|||||||
Reference in New Issue
Block a user