From 6d60fd4f7ea8f35daa7d20880a4761d2ade59b55 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Sat, 19 Jul 2025 12:17:03 +0200 Subject: [PATCH] Check ansible-output from CI instead of updating. --- noxfile.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/noxfile.py b/noxfile.py index ffeda8013f..dc1899a407 100644 --- a/noxfile.py +++ b/noxfile.py @@ -6,10 +6,14 @@ # dependencies = ["nox>=2025.02.09", "antsibull-nox"] # /// +import os import sys import nox +# Whether the noxfile is running in CI: +IN_CI = os.environ.get("CI") == "true" + try: import antsibull_nox @@ -43,7 +47,10 @@ def ansible_output(session: nox.Session) -> None: # Tools for post-processing "ruamel.yaml", # used by docs/docsite/reformat-yaml.py ) - session.run("antsibull-docs", "ansible-output", *session.posargs) + args = [] + if IN_CI: + args.append("--check") + session.run("antsibull-docs", "ansible-output", *args, *session.posargs) # Allow to run the noxfile with `python noxfile.py`, `pipx run noxfile.py`, or similar.