Debian Codegraph @

.github/workflows/ci.yml

raw
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@v5
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 - name: Store objects inventory for tests
59 uses: actions/upload-artifact@v4
60 with:
61 name: objects.inv
62 path: site/objects.inv
63
64 tests:
65
66 needs:
67 - quality
68 strategy:
69 matrix:
70 os:
71 - ubuntu-latest
72 - macos-latest
73 - windows-latest
74 python-version:
75 - "3.8"
76 - "3.9"
77 - "3.10"
78 - "3.11"
79 - "3.12"
80 - "3.13"
81 - "3.14"
82 resolution:
83 - highest
84 - lowest-direct
85 exclude:
86 - os: macos-latest
87 resolution: lowest-direct
88 - os: windows-latest
89 resolution: lowest-direct
90 runs-on: ${{ matrix.os }}
91 continue-on-error: ${{ matrix.python-version == '3.14' }}
92
93 steps:
94 - name: Checkout
95 uses: actions/checkout@v4
96 with:
97 fetch-depth: 0
98 fetch-tags: true
99
100 - name: Setup Python
101 uses: actions/setup-python@v5
102 with:
103 python-version: ${{ matrix.python-version }}
104 allow-prereleases: true
105
106 - name: Setup uv
107 uses: astral-sh/setup-uv@v5
108 with:
109 enable-cache: true
110 cache-dependency-glob: pyproject.toml
111 cache-suffix: ${{ matrix.resolution }}
112
113 - name: Install dependencies
114 env:
115 UV_RESOLUTION: ${{ matrix.resolution }}
116 run: make setup
117
118 - name: Download objects inventory
119 uses: actions/download-artifact@v4
120 with:
121 name: objects.inv
122 path: site/
123
124 - name: Run the test suite
125 run: make test