From 251c867aadeff8f8e96f5b38d54e246b11995f16 Mon Sep 17 00:00:00 2001 From: Tom Cobb Date: Wed, 30 Oct 2024 09:27:04 +0000 Subject: [PATCH] Do not run the linkcheck test on tag because of race condition --- tests/test_example.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/test_example.py b/tests/test_example.py index 5630feb..015bc04 100644 --- a/tests/test_example.py +++ b/tests/test_example.py @@ -52,7 +52,10 @@ def test_template_defaults(tmp_path: Path): catalog_info = tmp_path / "catalog-info.yaml" assert catalog_info.exists() run("./venv/bin/tox -p") - run("./venv/bin/tox -e docs build -- -b linkcheck") + if not run_pipe("git tag --points-at HEAD"): + # Only run linkcheck if not on a tag, as the CI might not have pushed + # the docs for this tag yet, so we will fail + run("./venv/bin/tox -e docs build -- -b linkcheck") run("./venv/bin/pip install build twine") run("./venv/bin/python -m build") run("./venv/bin/twine check --strict dist/*")