Repository navigation
53 lines (48 loc) · 1.46 KB
/
Copy pathci.yml
File metadata and controls
53 lines (48 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: CI
on:
push:
branches: [main]
pull_request:
permissions:
contents: read
jobs:
test:
name: Python ${{ matrix.python }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# Supported until: 3.10 2027-10, 3.11 2028-10, 3.12 2029-10, 3.13 2030-10, 3.14 2031-10
# (12 months after upstream end of life; see README "Supported versions").
python: ["3.10", "3.11", "3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@v7
- uses: astral-sh/setup-uv@v10.2.0
with:
python-version: ${{ matrix.python }}
- run: uv sync --locked
- run: uv run pytest
lowest:
name: Lowest dependency versions (Python 3.10)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: astral-sh/setup-uv@v10.2.0
with:
python-version: "3.10"
# --no-sync: a plain `uv run` would re-resolve to the highest versions and test nothing.
- run: uv sync --resolution lowest-direct
- run: uv run --no-sync python -c "import httpx, pydantic; print(httpx.__version__, pydantic.VERSION)"
- run: uv run --no-sync pytest
lint:
name: Lint and types
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: astral-sh/setup-uv@v10.2.0
with:
python-version: "3.14"
- run: uv sync --locked
- run: uv run ruff check
- run: uv run ruff format --check
- run: uv run mypy