-
Notifications
You must be signed in to change notification settings - Fork 130
62 lines (59 loc) · 1.96 KB
/
Copy pathtest.yml
File metadata and controls
62 lines (59 loc) · 1.96 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
54
55
56
57
58
59
60
61
62
name: Python Test Package
on:
pull_request:
branches:
- main
jobs:
# Reproducible run: exactly the versions recorded in uv.lock.
test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [
"3.10",
"3.13",
"3.14",
]
exclude:
- os: windows-latest
python-version: "3.13"
- os: windows-latest
python-version: "3.14"
runs-on: ${{ matrix.os }}
steps:
- name: Checkout source code
uses: actions/checkout@v7
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v7
- name: Install locked dependencies
# `--locked` fails the job if uv.lock is out of date with pyproject.toml.
run: uv sync --locked --extra test-all
- name: Show installed versions
run: uv pip freeze
- name: Run tests
# `--no-sync` is required: without it `uv run` re-syncs the environment to uv.lock,
# silently discarding anything installed by a previous step.
run: uv run --no-sync pytest -n auto --disable-warnings
# Guard rail: prove that the lower bounds declared in pyproject.toml actually work.
# `--resolution lowest-direct` pins every direct dependency to its declared floor and
# leaves transitive ones at their newest compatible release.
minimum-versions:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v7
- name: Install uv
uses: astral-sh/setup-uv@v7
- name: Install lowest supported dependencies
run: |
uv venv --python 3.10
uv pip install --resolution lowest-direct -e ".[test-all]"
- name: Show installed versions
run: uv pip freeze
- name: Run tests
run: uv run --no-sync pytest -n auto --disable-warnings