-
Notifications
You must be signed in to change notification settings - Fork 1
53 lines (47 loc) · 1.91 KB
/
Copy pathpython-package.yml
File metadata and controls
53 lines (47 loc) · 1.91 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
# Install dependencies with uv, then run tests across supported Python and
# SQLAlchemy versions.
# See: https://docs.astral.sh/uv/guides/integration/github/
name: Python package
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
name: py${{ matrix.python-version }} / ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@v5
- name: Install uv and set up Python ${{ matrix.python-version }}
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
python-version: ${{ matrix.python-version }}
enable-cache: true
- name: Run tests (latest dependencies)
run: uv run pytest
test-min-deps:
# Exercise the lowest supported dependency versions on the lowest supported
# Python. (Pinning the oldest deps against the newest Python is not a real
# combination, so this only runs on the floor interpreter.)
name: min deps
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Install uv and set up Python 3.10
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
python-version: "3.10"
enable-cache: true
# --resolution lowest-direct pins every direct dependency to its lowest
# allowed version, which exercises the SQLAlchemy>=2.0 floor. The
# sqlmodel group is excluded because sqlmodel's own SQLAlchemy pin would
# lift the resolved SQLAlchemy above 2.0.0, defeating the floor check;
# the sqlmodel compat tests skip themselves when sqlmodel is absent.
- name: Run tests (lowest supported dependencies)
run: uv run --resolution lowest-direct --no-group sqlmodel pytest