Skip to content

Commit 1a88e8d

Browse files
committed
uv - migrate
1 parent 6b9e4e7 commit 1a88e8d

File tree

3 files changed

+30
-55
lines changed

3 files changed

+30
-55
lines changed

.github/workflows/codecov.yml

Lines changed: 26 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -2,56 +2,55 @@ name: Codecov
22
on: [push, pull_request]
33
jobs:
44
run:
5-
name: test ${{ matrix.os }} / ${{ matrix.python }}
5+
name: test ${{ matrix.os }} / ${{ matrix.python-version }}
66
runs-on: ${{ matrix.os }}
77
strategy:
88
matrix:
99
os: [ubuntu-latest]
10-
python: ["3.9", "3.10", "3.11", "3.12", "3.13"]
10+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
1111
env:
1212
OS: ${{ matrix.os }}
13-
PYTHON: ${{ matrix.python }}
13+
PYTHON: ${{ matrix.python-version }}
1414
steps:
1515
- uses: actions/checkout@master
16-
- uses: pdm-project/setup-pdm@v4
16+
17+
- uses: astral-sh/setup-uv@v5
1718
with:
18-
python-version: ${{ matrix.python }}
19-
allow-python-prereleases: true
20-
cache: true
19+
python-version: ${{ matrix.python-version }}
20+
2121
- name: install deps
2222
run: |
23-
pdm use -f $PYTHON
24-
pdm install -d
23+
uv sync
24+
- run: 'uv run python -c "import pydantic.version; print(pydantic.version.version_info())"'
2525
- name: Generate coverage report (default)
2626
run: |
27-
pdm run pytest --cov=aiopenapi3/ --cov-report=xml:./coverage/reports/coverage-default.xml tests/
28-
pdm run pytest --cov=tests/ --cov-report=xml:./coverage/reports/coverage-default-tests.xml tests/
27+
uv run coverage run -m pytest tests/
28+
env:
29+
COVERAGE_FILE: coverage/coverage-with-deps
30+
CONTEXT: ${{ runner.os }}-py${{ matrix.python-version }}-without
31+
2932
- name: install optional deps
3033
run: |
31-
pdm install -G auth,socks
34+
uv sync --all-extras
35+
3236
- name: Generate coverage report (options)
3337
run: |
34-
pdm run pytest --cov=aiopenapi3/ --cov-report=xml:./coverage/reports/coverage-optional.xml tests/
35-
pdm run pytest --cov=tests/ --cov-report=xml:./coverage/reports/coverage-optional-tests.xml tests/
38+
uv run coverage run -m pytest tests/
39+
env:
40+
COVERAGE_FILE: coverage/coverage-with-deps
41+
CONTEXT: ${{ runner.os }}-py${{ matrix.python-version }}-with
42+
43+
- name: debug coverage files
44+
run: find .
45+
3646
- name: Upload coverage to Codecov (core)
3747
uses: codecov/codecov-action@v4
3848
with:
3949
token: ${{ secrets.CODECOV_TOKEN }}
40-
directory: ./coverage/reports/
41-
files: coverage-default.xml,coverage-optional.xml
50+
directory: ./coverage/
51+
files: coverage-with,coverage-without
4252
env_vars: OS,PYTHON
4353
fail_ci_if_error: false
4454
flags: core
4555
name: codecov-aiopenapi3
4656
verbose: true
47-
- name: Upload coverage to Codecov (tests)
48-
uses: codecov/codecov-action@v4
49-
with:
50-
token: ${{ secrets.CODECOV_TOKEN }}
51-
directory: ./coverage/reports/
52-
files: coverage-default-tests.xml,coverage-optional-tests.xml
53-
env_vars: OS,PYTHON
54-
fail_ci_if_error: false
55-
flags: tests
56-
name: codecov-aiopenapi3-tests
57-
verbose: true

.github/workflows/pdm.yml

Lines changed: 0 additions & 23 deletions
This file was deleted.

pyproject.toml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,17 +102,16 @@ log_cli_date_format = "%Y-%m-%d %H:%M:%S"
102102

103103
addopts = "--ignore-glob 'tests/my_*.py'"
104104

105-
[tool.pdm.dev-dependencies]
106-
tests = [
105+
[tool.uv]
106+
dev-dependencies = [
107107
"pytest",
108108
"pytest-asyncio>=0.24.0",
109109
"pytest-httpx",
110110
"pytest-cov",
111111
"pytest-mock",
112112
"fastapi",
113113
"fastapi-versioning",
114-
"uvloop == 0.21.0b1; python_version >= '3.13'",
115-
"uvloop; python_version < '3.13'",
114+
"uvloop",
116115
"flask",
117116
"flask_wtf",
118117
"wtforms",
@@ -122,7 +121,7 @@ tests = [
122121
"bootstrap-flask",
123122
"ijson",
124123
"python-multipart>=0.0.6",
125-
"pydantic-extra-types @ git+https://github.com/pydantic/pydantic-extra-types.git@3668b3af8ab378c56342c613672aa9415dab865b"
124+
"pydantic-extra-types>=2.10.1"
126125
]
127126

128127
[tool.pdm]

0 commit comments

Comments
 (0)