Contrib unit tests separation #3320
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI / Docs | |
| on: | |
| push: | |
| pull_request: | |
| types: [opened, synchronize] | |
| jobs: | |
| docs_build: | |
| name: "Build" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.10" | |
| - name: Get full Python version | |
| id: full-python-version | |
| run: python -c "import sys; print(f\"version={'-'.join(str(v) for v in sys.version_info)}\")" >> "$GITHUB_OUTPUT" | |
| - name: Set up poetry | |
| uses: Gr1N/setup-poetry@v9 | |
| with: | |
| poetry-version: "2.3.1" | |
| - name: Configure poetry | |
| run: poetry config virtualenvs.in-project true | |
| - name: Set up cache | |
| uses: actions/cache@v5 | |
| id: cache | |
| with: | |
| path: .venv | |
| key: venv-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('**/poetry.lock') }} | |
| - name: Ensure cache is healthy | |
| if: steps.cache.outputs.cache-hit == 'true' | |
| run: timeout 10s poetry run pip --version || rm -rf .venv | |
| - name: Install dependencies | |
| run: poetry install --with docs | |
| - name: Build documentation | |
| run: | | |
| poetry run python -m mkdocs build --clean --site-dir ./_build/html --config-file mkdocs.yml | |
| - uses: actions/upload-artifact@v6 | |
| name: Upload docs as artifact | |
| with: | |
| name: docs-html | |
| path: './_build/html' | |
| if-no-files-found: error |