Debian Codegraph @

.github/workflows/ci.yml

raw
1 name: ci
2
3 on:
4 push:
5 branches:
6 - main
7 - test-me-*
8 pull_request:
9 branches:
10 - main
11
12 concurrency:
13 group: ${{ github.workflow }}-${{ github.ref }}
14 cancel-in-progress: ${{ github.event_name == 'pull_request' }}
15
16 defaults:
17 run:
18 shell: bash
19
20 env:
21 LANG: en_US.utf-8
22 LC_ALL: en_US.utf-8
23 PYTHONIOENCODING: UTF-8
24 PYTHONPATH: docs
25 PYTHONWARNDEFAULTENCODING: "1"
26 PYTHON_VERSIONS: ""
27
28 jobs:
29
30 quality:
31 strategy:
32 matrix:
33 os:
34 - ubuntu-latest
35 - macos-latest
36 - windows-latest
37 python-version:
38 - "3.10"
39 - "3.14"
40 include:
41 - os: ubuntu-latest
42 python-version: "3.11"
43 - os: ubuntu-latest
44 python-version: "3.12"
45 - os: ubuntu-latest
46 python-version: "3.13"
47 - os: ubuntu-latest
48 python-version: "3.15-dev"
49
50 runs-on: ${{ matrix.os }}
51 continue-on-error: true
52
53 steps:
54 - name: Checkout
55 uses: actions/checkout@v4
56 with:
57 fetch-depth: 0
58 fetch-tags: true
59
60 - name: Setup Python
61 uses: actions/setup-python@v6
62 with:
63 python-version: ${{ matrix.python-version }}
64
65 - name: Setup uv
66 uses: astral-sh/setup-uv@v5
67 with:
68 enable-cache: true
69 cache-dependency-glob: pyproject.toml
70
71 - name: Install dependencies
72 run: make setup
73
74 - name: Check if the documentation builds correctly
75 run: make check-docs
76
77 - name: Check the code quality
78 run: make check-quality
79
80 - name: Check if the code is correctly typed
81 run: make check-types
82
83 - name: Check for breaking changes in the API
84 run: make check-api
85
86 - name: Store objects inventory for tests
87 uses: actions/upload-artifact@v4
88 if: ${{ matrix.os == 'ubuntu-latest' && matrix.python-version == '3.13' }}
89 with:
90 name: objects.inv
91 path: site/objects.inv
92
93 tests:
94
95 needs:
96 - quality
97 strategy:
98 matrix:
99 os:
100 - ubuntu-latest
101 - macos-latest
102 - windows-latest
103 python-version:
104 - "3.10"
105 - "3.11"
106 - "3.12"
107 - "3.13"
108 - "3.14"
109 - "3.15-dev"
110 resolution:
111 - highest
112 - lowest-direct
113 exclude:
114 - os: macos-latest
115 resolution: lowest-direct
116 - os: windows-latest
117 resolution: lowest-direct
118
119 runs-on: ${{ matrix.os }}
120 continue-on-error: true
121
122 steps:
123 - name: Checkout
124 uses: actions/checkout@v4
125 with:
126 fetch-depth: 0
127 fetch-tags: true
128
129 - name: Setup Python
130 uses: actions/setup-python@v6
131 with:
132 python-version: ${{ matrix.python-version }}
133 allow-prereleases: true
134
135 - name: Setup uv
136 uses: astral-sh/setup-uv@v5
137 with:
138 enable-cache: true
139 cache-dependency-glob: pyproject.toml
140 cache-suffix: ${{ matrix.resolution }}
141
142 - name: Install dependencies
143 env:
144 UV_RESOLUTION: ${{ matrix.resolution }}
145 run: make setup
146
147 - name: Download objects inventory
148 uses: actions/download-artifact@v4
149 with:
150 name: objects.inv
151 path: site/
152
153 - name: Run the test suite
154 run: make test