From 13e200b437eec37c4a617d5d69f5f801653a9292 Mon Sep 17 00:00:00 2001 From: Alessandro Benetti <61062230+Benetti-Hub@users.noreply.github.com> Date: Mon, 15 Jul 2024 23:21:37 +0200 Subject: [PATCH] add strict mkdocs check (#5497) --- .github/workflows/docs.yml | 1 + .github/workflows/test.yml | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index b8074363..def8b316 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -26,4 +26,5 @@ jobs: restore-keys: | mkdocs-material- - run: pip install -e .[docs] + - run: mkdocs build --strict - run: mkdocs gh-deploy --force \ No newline at end of file diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ee7b7793..0bc1240f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -79,7 +79,7 @@ jobs: path: ${{ env.Python3_ROOT_DIR }}/lib/python3.8/site-packages key: linting-packages-${{ hashFiles('**/setup.py') }}-3.8 - name: Install dependencies - run: pip install -e '.[linting,testing]' --extra-index-url https://download.pytorch.org/whl/cpu + run: pip install -e '.[linting,testing,docs]' --extra-index-url https://download.pytorch.org/whl/cpu - name: Lint with pylint run: python -m pylint --disable=all -e W0311 -e C0303 --jobs=0 --indent-string=' ' **/*.py - name: Lint with ruff @@ -94,6 +94,8 @@ jobs: run: | python docs/abstractions2.py python docs/abstractions3.py + - name: Test Docs Build + run: mkdocs build --strict - name: Test Quickstart run: awk '/```python/{flag=1;next}/```/{flag=0}flag' docs/quickstart.md > quickstart.py && PYTHONPATH=. python quickstart.py - name: Test README