| 
 | 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 | + | 
 | 29 | +    - name: Fetch all tags  | 
 | 30 | +      run: git fetch --depth=1 --tags  | 
 | 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 | +  exclude-test-jobs:  | 
 | 59 | +    runs-on: ubuntu-latest  | 
 | 60 | +    outputs:  | 
 | 61 | +      jobs: ${{ steps.exclude-jobs.outputs.jobs }}  | 
 | 62 | +    steps:  | 
 | 63 | +    - id: exclude-jobs  | 
 | 64 | +      run: |  | 
 | 65 | +        if ${{ github.repository_owner == 'pawamoy-insiders' }}; then  | 
 | 66 | +          echo 'jobs=[  | 
 | 67 | +            {"os": "macos-latest"},  | 
 | 68 | +            {"os": "windows-latest"},  | 
 | 69 | +            {"python-version": "3.10"},  | 
 | 70 | +            {"python-version": "3.11"},  | 
 | 71 | +            {"python-version": "3.12"},  | 
 | 72 | +            {"python-version": "3.13"},  | 
 | 73 | +            {"python-version": "3.14"}  | 
 | 74 | +          ]' | tr -d '[:space:]' >> $GITHUB_OUTPUT  | 
 | 75 | +        else  | 
 | 76 | +          echo 'jobs=[  | 
 | 77 | +            {"os": "macos-latest", "resolution": "lowest-direct"},  | 
 | 78 | +            {"os": "windows-latest", "resolution": "lowest-direct"}  | 
 | 79 | +          ]' | tr -d '[:space:]' >> $GITHUB_OUTPUT  | 
 | 80 | +        fi  | 
 | 81 | +
  | 
 | 82 | +  tests:  | 
 | 83 | + | 
 | 84 | +    needs: exclude-test-jobs  | 
 | 85 | +    strategy:  | 
 | 86 | +      matrix:  | 
 | 87 | +        os:  | 
 | 88 | +        - ubuntu-latest  | 
 | 89 | +        - macos-latest  | 
 | 90 | +        - windows-latest  | 
 | 91 | +        python-version:  | 
 | 92 | +        - "3.9"  | 
 | 93 | +        - "3.10"  | 
 | 94 | +        - "3.11"  | 
 | 95 | +        - "3.12"  | 
 | 96 | +        - "3.13"  | 
 | 97 | +        - "3.14"  | 
 | 98 | +        resolution:  | 
 | 99 | +        - highest  | 
 | 100 | +        - lowest-direct  | 
 | 101 | +        exclude: ${{ fromJSON(needs.exclude-test-jobs.outputs.jobs) }}  | 
 | 102 | +    runs-on: ${{ matrix.os }}  | 
 | 103 | +    continue-on-error: ${{ matrix.python-version == '3.14' }}  | 
 | 104 | + | 
 | 105 | +    steps:  | 
 | 106 | +    - name: Checkout  | 
 | 107 | +      uses: actions/checkout@v4  | 
 | 108 | + | 
 | 109 | +    - name: Setup Python  | 
 | 110 | +      uses: actions/setup-python@v5  | 
 | 111 | +      with:  | 
 | 112 | +        python-version: ${{ matrix.python-version }}  | 
 | 113 | +        allow-prereleases: true  | 
 | 114 | + | 
 | 115 | +    - name: Setup uv  | 
 | 116 | +      uses: astral-sh/setup-uv@v3  | 
 | 117 | +      with:  | 
 | 118 | +        enable-cache: true  | 
 | 119 | +        cache-dependency-glob: pyproject.toml  | 
 | 120 | +        cache-suffix: py${{ matrix.python-version }}  | 
 | 121 | + | 
 | 122 | +    - name: Install dependencies  | 
 | 123 | +      env:  | 
 | 124 | +        UV_RESOLUTION: ${{ matrix.resolution }}  | 
 | 125 | +      run: make setup  | 
 | 126 | + | 
 | 127 | +    - name: Run the test suite  | 
 | 128 | +      run: make test  | 
0 commit comments