Skip to content

Commit 5045f91

Browse files
committed
uv - migrate
1 parent 6b9e4e7 commit 5045f91

File tree

2 files changed

+21
-48
lines changed

2 files changed

+21
-48
lines changed

.github/workflows/codecov.yml

Lines changed: 21 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -7,51 +7,47 @@ jobs:
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 --group auth,socks --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+
3643
- name: Upload coverage to Codecov (core)
3744
uses: codecov/codecov-action@v4
3845
with:
3946
token: ${{ secrets.CODECOV_TOKEN }}
4047
directory: ./coverage/reports/
41-
files: coverage-default.xml,coverage-optional.xml
48+
files: coverage-with,coverage-without
4249
env_vars: OS,PYTHON
4350
fail_ci_if_error: false
4451
flags: core
4552
name: codecov-aiopenapi3
4653
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.

0 commit comments

Comments
 (0)