/ .github / workflows / ci.yml
ci.yml
  1  name: ci
  2  
  3  on:
  4    push:
  5    pull_request:
  6      branches:
  7      - main
  8  
  9  defaults:
 10    run:
 11      shell: bash
 12  
 13  env:
 14    LANG: en_US.utf-8
 15    LC_ALL: en_US.utf-8
 16    PYTHONIOENCODING: UTF-8
 17    PYTHON_VERSIONS: ""
 18  
 19  jobs:
 20  
 21    quality:
 22  
 23      runs-on: ubuntu-latest
 24  
 25      steps:
 26      - name: Checkout
 27        uses: actions/checkout@v4
 28        with:
 29          fetch-depth: 0
 30          fetch-tags: true
 31  
 32      - name: Setup Python
 33        uses: actions/setup-python@v5
 34        with:
 35          python-version: "3.12"
 36  
 37      - name: Setup uv
 38        uses: astral-sh/setup-uv@v3
 39        with:
 40          enable-cache: true
 41          cache-dependency-glob: pyproject.toml
 42  
 43      - name: Install dependencies
 44        run: make setup
 45  
 46      - name: Check if the documentation builds correctly
 47        run: make check-docs
 48  
 49      - name: Check the code quality
 50        run: make check-quality
 51  
 52      - name: Check if the code is correctly typed
 53        run: make check-types
 54  
 55      - name: Check for breaking changes in the API
 56        run: make check-api
 57  
 58    tests:
 59  
 60      strategy:
 61        matrix:
 62          os:
 63          - ubuntu-latest
 64          - macos-latest
 65          - windows-latest
 66          python-version:
 67          - "3.9"
 68          - "3.10"
 69          - "3.11"
 70          - "3.12"
 71          - "3.13"
 72          - "3.14"
 73          resolution:
 74          - highest
 75          - lowest-direct
 76          exclude:
 77          - os: macos-latest
 78            resolution: lowest-direct
 79          - os: windows-latest
 80            resolution: lowest-direct
 81      runs-on: ${{ matrix.os }}
 82      continue-on-error: ${{ matrix.python-version == '3.14' }}
 83  
 84      steps:
 85      - name: Checkout
 86        uses: actions/checkout@v4
 87        with:
 88          fetch-depth: 0
 89          fetch-tags: true
 90  
 91      - name: Setup Python
 92        uses: actions/setup-python@v5
 93        with:
 94          python-version: ${{ matrix.python-version }}
 95          allow-prereleases: true
 96  
 97      - name: Setup uv
 98        uses: astral-sh/setup-uv@v3
 99        with:
100          enable-cache: true
101          cache-dependency-glob: pyproject.toml
102          cache-suffix: py${{ matrix.python-version }}
103  
104      - name: Install dependencies
105        env:
106          UV_RESOLUTION: ${{ matrix.resolution }}
107        run: make setup
108  
109      - name: Run the test suite
110        run: make test