Fix ReadTheDocs build: specify linkify-it-py version #5
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 Pipeline | |
| on: | |
| push: | |
| branches: [main, develop] | |
| tags: ['v*'] | |
| pull_request: | |
| branches: [main] | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12", "3.13"] | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| exclude: | |
| # Exclude some combinations to reduce CI time | |
| - os: windows-latest | |
| python-version: "3.11" | |
| - os: macos-latest | |
| python-version: "3.11" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: 'pip' | |
| cache-dependency-path: | | |
| requirements.txt | |
| requirements-dev.txt | |
| pyproject.toml | |
| - name: Install system dependencies (Linux) | |
| if: runner.os == 'Linux' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libgl1-mesa-glx libglib2.0-0 | |
| - name: Install system dependencies (macOS) | |
| if: runner.os == 'macOS' | |
| run: | | |
| # Install any macOS-specific dependencies if needed | |
| echo "macOS system dependencies installed" | |
| - name: Install system dependencies (Windows) | |
| if: runner.os == 'Windows' | |
| run: | | |
| # Install any Windows-specific dependencies if needed | |
| echo "Windows system dependencies installed" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip wheel | |
| pip install -r requirements.txt | |
| pip install -r requirements-dev.txt | |
| pip install -e . | |
| - name: Lint with Ruff | |
| run: ruff check . --config=.ruff.toml | |
| - name: Check formatting with Black | |
| run: black --check src/ examples/ benchmarks/ stubs/ | |
| - name: Check import sorting with isort | |
| run: isort --check-only src/ examples/ benchmarks/ stubs/ | |
| - name: Type check with MyPy | |
| run: mypy src --config-file=pyproject.toml || true | |
| - name: Security check with Bandit | |
| run: bandit -r src/ || true | |
| - name: Run tests | |
| env: | |
| PYTHONWARNINGS: default | |
| run: | | |
| pytest tests/ -v \ | |
| --cov=src \ | |
| --cov-report=xml \ | |
| --cov-report=term-missing \ | |
| --color=yes | |
| build: | |
| runs-on: ubuntu-latest | |
| needs: test | |
| if: github.ref == 'refs/heads/main' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| cache: 'pip' | |
| cache-dependency-path: | | |
| requirements.txt | |
| requirements-dev.txt | |
| pyproject.toml | |
| - name: Install build dependencies | |
| run: | | |
| python -m pip install --upgrade pip wheel build twine | |
| - name: Build package | |
| run: python -m build | |
| - name: Check package | |
| run: twine check dist/* | |
| - name: Upload build artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: dist | |
| path: dist/ | |
| retention-days: 30 | |
| docs: | |
| runs-on: ubuntu-latest | |
| if: github.ref == 'refs/heads/main' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| cache: 'pip' | |
| cache-dependency-path: | | |
| requirements.txt | |
| docs/requirements.txt | |
| pyproject.toml | |
| - name: Install system dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libgl1-mesa-glx libglib2.0-0 | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip wheel | |
| if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
| if [ -f docs/requirements.txt ]; then pip install -r docs/requirements.txt; fi | |
| pip install -e ".[docs]" | |
| - name: Build documentation | |
| run: | | |
| set -e | |
| if [ -f docs/Makefile ]; then | |
| make -C docs html | |
| else | |
| sphinx-build -b html docs docs/_build/html | |
| fi | |
| - name: Upload documentation | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: documentation | |
| path: docs/_build/html/ | |
| retention-days: 7 |