Started Continuous Integration (CI) workflow #215
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
| # Continuous Integration (CI) Workflow | |
| # ==================================== | |
| # | |
| # Author: Akshay Mestry <xa@mes3.dev> | |
| # Created on: 26 August, 2025 | |
| # Last updated on: 14 February, 2026 | |
| name: Continuous Integration | |
| run-name: Started ${{ github.workflow }} (CI) workflow | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| paths: | |
| - ".github/**" | |
| - "docs/**" | |
| - "theme/**" | |
| - "pyproject.toml" | |
| - "requirements.txt" | |
| env: | |
| OUTPUT_DIR: docs/build/ | |
| SOURCE_DIR: docs/source/ | |
| PYTHON_VERSION: "3.13.7" | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| prepare: | |
| name: Prepare Environment | |
| runs-on: ubuntu-latest | |
| outputs: | |
| requirements-cache-key: ${{ steps.cache-key.outputs.key }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 1 | |
| - name: Compute requirements cache key | |
| id: cache-key | |
| run: echo "key=${{ runner.os }}-pip-$(sha256sum requirements.txt | cut -d' ' -f1)" >> $GITHUB_OUTPUT | |
| lint: | |
| name: Lint Python code | |
| needs: prepare | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 1 | |
| - name: Setup Python ${{ env.PYTHON_VERSION }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ env.PYTHON_VERSION }} | |
| - name: Cache pip dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/pip | |
| key: ${{ needs.prepare.outputs.requirements-cache-key }} | |
| restore-keys: ${{ runner.os }}-pip- | |
| - name: Install project dependencies | |
| run: python -m pip install -Uq pip tox | |
| - name: Run linting (ruff) | |
| run: tox -e lint | |
| format: | |
| name: Format Python code | |
| needs: prepare | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 1 | |
| - name: Setup Python ${{ env.PYTHON_VERSION }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ env.PYTHON_VERSION }} | |
| - name: Cache pip dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/pip | |
| key: ${{ needs.prepare.outputs.requirements-cache-key }} | |
| restore-keys: ${{ runner.os }}-pip- | |
| - name: Install project dependencies | |
| run: python -m pip install -Uq pip tox | |
| - name: Run formatting (ruff) | |
| run: tox -e format | |
| typecheck: | |
| name: Typecheck Python code | |
| needs: prepare | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 1 | |
| - name: Setup Python ${{ env.PYTHON_VERSION }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ env.PYTHON_VERSION }} | |
| - name: Cache pip dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/pip | |
| key: ${{ needs.prepare.outputs.requirements-cache-key }} | |
| restore-keys: ${{ runner.os }}-pip- | |
| - name: Install project dependencies | |
| run: python -m pip install -Uq pip tox | |
| - name: Run typechecking (mypy) | |
| run: tox -e typecheck | |
| sphinxlint: | |
| name: Lint rST files | |
| needs: prepare | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 1 | |
| - name: Setup Python ${{ env.PYTHON_VERSION }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ env.PYTHON_VERSION }} | |
| - name: Cache pip dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/pip | |
| key: ${{ needs.prepare.outputs.requirements-cache-key }} | |
| restore-keys: ${{ runner.os }}-pip- | |
| - name: Install documentation dependencies | |
| run: python -m pip install -Uq -e . | |
| - name: Run Sphinx linting | |
| run: sphinx-lint $SOURCE_DIR --disable role-with-double-backticks,role-without-backticks --max-line-length 79 | |
| build: | |
| name: Build website pages | |
| needs: [prepare, sphinxlint] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 1 | |
| - name: Setup Python ${{ env.PYTHON_VERSION }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ env.PYTHON_VERSION }} | |
| - name: Cache pip dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/pip | |
| key: ${{ needs.prepare.outputs.requirements-cache-key }} | |
| restore-keys: ${{ runner.os }}-pip- | |
| - name: Install documentation dependencies | |
| run: python -m pip install -Uq -e . | |
| - name: Build HTML pages with Sphinx | |
| run: sphinx-build --builder dirhtml --fail-on-warning --show-traceback --fresh-env --write-all --quiet $SOURCE_DIR $OUTPUT_DIR |