From 1c61a30da410679ed109287a9018b916875b8460 Mon Sep 17 00:00:00 2001 From: Revathyvenugopal162 Date: Mon, 10 Jun 2024 12:18:22 +0200 Subject: [PATCH] fix: add link check tox env --- tox.ini | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/tox.ini b/tox.ini index a28b939c3e..6e46561395 100644 --- a/tox.ini +++ b/tox.ini @@ -3,8 +3,8 @@ description = Default tox environments list envlist = code-style doc-style - {py38,py39,py310,py311,py312}{,-coverage} - doc + {py39,py310,py311,py312}{,-coverage} + doc-{links,html} skip_missing_interpreters = true isolated_build = true isolated_build_env = build @@ -12,12 +12,12 @@ isolated_build_env = build [testenv] description = Checks for project unit tests and coverage (if desired) basepython = - py39: python3.9 - py310: python3.10 - py311: python3.11 - py312: python3.12 + tests39: python3.9 + tests310: python3.10 + tests311: python3.11 + tests312: python3.12 py: python3 - {style,reformat,doc}: python3 + {code-style,doc-links,doc-html, tests}: python3 setenv = PYTHONUNBUFFERED = yes coverage: PYTEST_EXTRA_ARGS = --cov=ansys.mapdl --cov-report=term --cov-report=xml:.cov/xml --cov-report=html:.cov/html @@ -43,8 +43,14 @@ commands = vale sync --config="{toxinidir}/doc/.vale.ini" vale --config="{toxinidir}/doc/.vale.ini" "{toxinidir}/doc" -[testenv:doc] +[testenv:doc-{links, html}] description = Check if documentation generates properly +setenv = + links: BUILDER = linkcheck + html: BUILDER = html +passenv = + BUILD_API + BUILD_EXAMPLES extras = doc commands = - sphinx-build -d "{toxworkdir}/doc_doctree" doc/source "{toxworkdir}/doc_out" --color -vW -bhtml \ No newline at end of file + sphinx-build -d "{toxworkdir}/doc_doctree" doc/source "{toxinidir}/doc/_build/{env:BUILDER}" --color -vW -b {env:BUILDER} -j auto