From 613c3f18c40c8f6ca35329001463af6e7f1299fb Mon Sep 17 00:00:00 2001
From: Tobias Meisel <tobias.meisel@ufz.de>
Date: Wed, 22 Jan 2025 13:30:38 +0100
Subject: [PATCH] [CI] Sphinx warning should be shown in console

---
 .gitlab-ci.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 817d7e86f..fe8b49706 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -194,13 +194,13 @@ docs preview [M]:
     - pip install -e .[docs]
     - *pip-setup-extra-headless
   script:
-    - make docs SPHINXOPTS="--keep-going -n -j 4" > sphinx_output.log 2>&1
+    - make docs SPHINXOPTS="--keep-going -n -j 4" | tee sphinx_output.log
     - echo "Counting warnings in Sphinx output..."
     # Count lines with "WARNING" in the Sphinx log
     - warning_count=$(grep -c "WARNING" sphinx_output.log || true)
     - echo "Found $warning_count warnings in Sphinx documentation."
     # Set the warning threshold
-    - warning_threshold=11
+    - warning_threshold=7
     # Check if warnings exceed the threshold
     - if [ "$warning_count" -lt "$warning_threshold" ]; then
         echo "Warnings ($warning_count) are below the threshold ($warning_threshold). Pipeline is green.";
-- 
GitLab