docs: fix malformed-RST docstring warnings and enable -W in CI #240
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: Run validation | |
| on: [push] | |
| jobs: | |
| build: | |
| name: Run validation | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| version: "latest" | |
| enable-cache: true | |
| - name: "Set up Python" | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version-file: ".python-version" | |
| - name: Install Python dependencies | |
| run: | | |
| uv sync --all-extras | |
| - name: Run automated validation checks | |
| run: | | |
| uv run python -m unittest discover -s tests.unit | |
| env: | |
| CURRENT_BRANCH_NAME: ${{ github.head_ref || github.ref_name }} | |
| docs: | |
| name: Build docs | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| version: "latest" | |
| enable-cache: true | |
| - name: "Set up Python" | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version-file: ".python-version" | |
| - name: Install docs dependencies | |
| run: | | |
| uv sync --group docs | |
| # Builds the same way github-pages.yml deploys, so doc-build breakage is | |
| # caught on PRs instead of only on the deploy-to-main step. -W turns doc | |
| # warnings into errors (--keep-going reports them all before failing) so | |
| # they can't silently accumulate. This job does not deploy. | |
| - name: Build docs | |
| run: | | |
| make html SPHINXOPTS="-W --keep-going" |