Skip to content
Snippets Groups Projects
Commit 613c3f18 authored by Tobias Meisel's avatar Tobias Meisel
Browse files

[CI] Sphinx warning should be shown in console

parent 89abe7b8
No related branches found
No related tags found
1 merge request!242[Project] Release 0.5.0
Pipeline #27359 passed
...@@ -194,13 +194,13 @@ docs preview [M]: ...@@ -194,13 +194,13 @@ docs preview [M]:
- pip install -e .[docs] - pip install -e .[docs]
- *pip-setup-extra-headless - *pip-setup-extra-headless
script: 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..." - echo "Counting warnings in Sphinx output..."
# Count lines with "WARNING" in the Sphinx log # Count lines with "WARNING" in the Sphinx log
- warning_count=$(grep -c "WARNING" sphinx_output.log || true) - warning_count=$(grep -c "WARNING" sphinx_output.log || true)
- echo "Found $warning_count warnings in Sphinx documentation." - echo "Found $warning_count warnings in Sphinx documentation."
# Set the warning threshold # Set the warning threshold
- warning_threshold=11 - warning_threshold=7
# Check if warnings exceed the threshold # Check if warnings exceed the threshold
- if [ "$warning_count" -lt "$warning_threshold" ]; then - if [ "$warning_count" -lt "$warning_threshold" ]; then
echo "Warnings ($warning_count) are below the threshold ($warning_threshold). Pipeline is green."; echo "Warnings ($warning_count) are below the threshold ($warning_threshold). Pipeline is green.";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment