Skip to content

Commit e61b349

Browse files
authored
👷 Run tests with lower bound uv sync, update minimum dependencies (#154)
* Update test matrix as in `fastapi-cli` * 👷 Run tests with lower bound uv sync * Update version lower bound for `pytest` to avoid multiple errors * Update version lower bound for `rich-toolkit` to avoid `rich_toolkit.container' does not have the attribute 'getchar'` * Update version lower bound for `uvicorn` to avoid `Cannot open include file: 'longintrepr.h'` * Update version lower bound for `coverage` to avoid `startswith first arg must be bytes or a tuple of bytes, not str` on Win * Conditionally install Pydantic version depending on Python version * Update `typer` version lower bound to avoid `TyperArgument.make_metavar() takes 1 positional argument..` * Disable tests on Windows * Fix `No source for code` from coverage
1 parent dd3abc7 commit e61b349

3 files changed

Lines changed: 387 additions & 224 deletions

File tree

‎.github/workflows/test.yml‎

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,31 @@ jobs:
2525
test:
2626
strategy:
2727
matrix:
28-
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
28+
os: [ ubuntu-latest, macos-latest ]
29+
python-version: ["3.14"]
30+
uv-resolution:
31+
- highest
32+
include:
33+
- python-version: "3.9"
34+
os: macos-latest
35+
uv-resolution: lowest-direct
36+
- python-version: "3.10"
37+
os: ubuntu-latest
38+
uv-resolution: highest
39+
- python-version: "3.11"
40+
os: macos-latest
41+
uv-resolution: lowest-direct
42+
- python-version: "3.12"
43+
os: ubuntu-latest
44+
uv-resolution: highest
45+
- python-version: "3.13"
46+
os: macos-latest
47+
uv-resolution: lowest-direct
2948
fail-fast: false
30-
runs-on: ubuntu-latest
49+
runs-on: ${{ matrix.os }}
3150
env:
3251
UV_PYTHON: ${{ matrix.python-version }}
52+
UV_RESOLUTION: ${{ matrix.uv-resolution }}
3353
steps:
3454
- name: Dump GitHub context
3555
env:
@@ -52,17 +72,17 @@ jobs:
5272
with:
5373
limit-access-to-actor: true
5474
- name: Install Dependencies
55-
run: uv sync --locked --all-extras --dev
75+
run: uv sync --all-extras --dev
5676
- run: mkdir coverage
5777
- name: Test
58-
run: uv run --no-sync scripts/test.sh
78+
run: uv run --no-sync bash scripts/test.sh
5979
env:
6080
COVERAGE_FILE: coverage/.coverage.${{ runner.os }}-py${{ matrix.python-version }}
6181
CONTEXT: ${{ runner.os }}-py${{ matrix.python-version }}
6282
- name: Store coverage files
6383
uses: actions/upload-artifact@v4
6484
with:
65-
name: coverage-${{ matrix.python-version }}
85+
name: coverage-${{ runner.os }}-${{ matrix.python-version }}
6686
path: coverage
6787
include-hidden-files: true
6888

‎pyproject.toml‎

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,14 @@ classifiers = [
2929
"Programming Language :: Python :: 3.13",
3030
]
3131
dependencies = [
32-
"typer >= 0.12.3",
33-
"uvicorn[standard] >= 0.15.0",
32+
"typer >= 0.16.0",
33+
"uvicorn[standard] >= 0.17.6",
3434
"rignore >= 0.5.1",
3535
"httpx >= 0.27.0",
3636
"rich-toolkit >= 0.19.4",
37-
"pydantic[email] >= 2.0",
37+
"pydantic[email] >= 2.7.4; python_version < '3.13'",
38+
"pydantic[email] >= 2.8.0; python_version == '3.13'",
39+
"pydantic[email] >= 2.12.0; python_version >= '3.14'",
3840
"sentry-sdk >= 2.20.0",
3941
"fastar >= 0.8.0",
4042
]
@@ -45,8 +47,8 @@ standard = ["uvicorn[standard] >= 0.15.0"]
4547
[dependency-groups]
4648
dev = [
4749
"prek>=0.2.24,<1.0.0",
48-
"pytest>=4.4.0,<9.0.0",
49-
"coverage[toml]>=6.2,<8.0",
50+
"pytest>=7.0.0,<9.0.0",
51+
"coverage[toml]>=7.2,<8.0",
5052
"mypy==1.14.1",
5153
"ruff==0.13.0",
5254
"respx==0.22.0",
@@ -80,6 +82,7 @@ junit_family = "xunit2"
8082
parallel = true
8183
data_file = "coverage/.coverage"
8284
source = ["src", "tests"]
85+
relative_files = true
8386
context = '${CONTEXT}'
8487
dynamic_context = "test_function"
8588
omit = ["tests/assets/*"]

0 commit comments

Comments
 (0)