|
7 | 7 | strategy: |
8 | 8 | matrix: |
9 | 9 | 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"] |
11 | 11 | env: |
12 | 12 | OS: ${{ matrix.os }} |
13 | | - PYTHON: ${{ matrix.python }} |
| 13 | + PYTHON: ${{ matrix.python-version }} |
14 | 14 | steps: |
15 | 15 | - uses: actions/checkout@master |
16 | | - - uses: pdm-project/setup-pdm@v4 |
| 16 | + |
| 17 | + - uses: astral-sh/setup-uv@v5 |
17 | 18 | with: |
18 | | - python-version: ${{ matrix.python }} |
19 | | - allow-python-prereleases: true |
20 | | - cache: true |
| 19 | + python-version: ${{ matrix.python-version }} |
| 20 | + |
21 | 21 | - name: install deps |
22 | 22 | 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())"' |
25 | 25 | - name: Generate coverage report (default) |
26 | 26 | 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 | + |
29 | 32 | - name: install optional deps |
30 | 33 | run: | |
31 | | - pdm install -G auth,socks |
| 34 | + uv sync --group auth,socks --all-extras |
| 35 | +
|
32 | 36 | - name: Generate coverage report (options) |
33 | 37 | 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 | + |
36 | 43 | - name: Upload coverage to Codecov (core) |
37 | 44 | uses: codecov/codecov-action@v4 |
38 | 45 | with: |
39 | 46 | token: ${{ secrets.CODECOV_TOKEN }} |
40 | 47 | directory: ./coverage/reports/ |
41 | | - files: coverage-default.xml,coverage-optional.xml |
| 48 | + files: coverage-with,coverage-without |
42 | 49 | env_vars: OS,PYTHON |
43 | 50 | fail_ci_if_error: false |
44 | 51 | flags: core |
45 | 52 | name: codecov-aiopenapi3 |
46 | 53 | 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