From 650391891af11b2dd54d54b911e59d15ff4ae7c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89loi=20Rivard?= Date: Thu, 5 Dec 2024 11:03:26 +0100 Subject: [PATCH] doc: make CI fail if the documentation generation raise warnings --- .github/workflows/tests.yaml | 2 +- .gitlab-ci.yml | 2 +- doc/conf.py | 1 - pyproject.toml | 2 +- 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index e30e1e91..e4b6d5fc 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -108,4 +108,4 @@ jobs: - run: | export TZ=UTC uv sync --group doc - uv run sphinx-build doc build/sphinx/html + uv run sphinx-build doc build/sphinx/html --fail-on-warning diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index da591605..d25df09c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -78,5 +78,5 @@ doc: stage: test script: - uv sync --group doc - - uv run sphinx-build doc build/sphinx/html + - uv run sphinx-build doc build/sphinx/html --fail-on-warning - uv cache prune --ci diff --git a/doc/conf.py b/doc/conf.py index e24eb4dc..744000e7 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -56,7 +56,6 @@ exclude_patterns = [] pygments_style = "sphinx" todo_include_todos = True toctree_collapse = False - intersphinx_mapping = { "python": ("https://docs.python.org/3", None), "authlib": ("https://docs.authlib.org/en/latest", None), diff --git a/pyproject.toml b/pyproject.toml index 1936f031..e4938efe 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -239,7 +239,7 @@ basepython = ["python3.10"] [tool.tox.env.doc] dependency_groups = ["doc"] commands = [ - ["sphinx-build", "--builder", "html", "doc", "build/sphinx/html"], + ["sphinx-build", "--builder", "html", "--fail-on-warning", "doc", "build/sphinx/html"], ["sphinx-build", "--builder", "man", "doc", "build/sphinx/html"], ]