@@ -2,56 +2,57 @@ name: Codecov
22on : [push, pull_request]
33jobs :
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-without
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
41+ CONTEXT : ${{ runner.os }}-py${{ matrix.python-version }}-with
42+
43+ - name : debug coverage files
44+ run : |
45+ ls -al coverage
46+ file coverage/*
47+
3648 - name : Upload coverage to Codecov (core)
3749 uses : codecov/codecov-action@v4
3850 with :
3951 token : ${{ secrets.CODECOV_TOKEN }}
40- directory : ./ coverage/reports/
41- files : coverage-default.xml ,coverage-optional.xml
52+ directory : coverage
53+ files : coverage-with ,coverage-without
4254 env_vars : OS,PYTHON
4355 fail_ci_if_error : false
4456 flags : core
4557 name : codecov-aiopenapi3
4658 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
0 commit comments