Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 27 additions & 25 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,56 +2,58 @@ name: Codecov
on: [push, pull_request]
jobs:
run:
name: test ${{ matrix.os }} / ${{ matrix.python }}
name: test ${{ matrix.os }} / ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python: ["3.9", "3.10", "3.11", "3.12", "3.13"]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
env:
OS: ${{ matrix.os }}
PYTHON: ${{ matrix.python }}
PYTHON: ${{ matrix.python-version }}
steps:
- uses: actions/checkout@master
- uses: pdm-project/setup-pdm@v4

- uses: astral-sh/setup-uv@v5
with:
python-version: ${{ matrix.python }}
allow-python-prereleases: true
cache: true
- name: install deps
python-version: ${{ matrix.python-version }}

- name: Install core deps
run: |
pdm use -f $PYTHON
pdm install -d
- name: Generate coverage report (default)
uv sync
- run: 'uv run python -c "import pydantic.version; print(pydantic.version.version_info())"'
- name: Generate coverage report (core)
run: |
pdm run pytest --cov=aiopenapi3/ --cov-report=xml:./coverage/reports/coverage-default.xml tests/
pdm run pytest --cov=tests/ --cov-report=xml:./coverage/reports/coverage-default-tests.xml tests/
- name: install optional deps
uv run pytest --cov=. --cov-report=xml:./coverage/coverage-core.xml tests/

- name: Install extra deps
run: |
pdm install -G auth,socks
- name: Generate coverage report (options)
uv sync --all-extras

- name: Generate coverage report (extra)
run: |
pdm run pytest --cov=aiopenapi3/ --cov-report=xml:./coverage/reports/coverage-optional.xml tests/
pdm run pytest --cov=tests/ --cov-report=xml:./coverage/reports/coverage-optional-tests.xml tests/
uv run pytest --cov=. --cov-report=xml:./coverage/coverage-extra.xml tests/

- name: Upload coverage to Codecov (core)
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: ./coverage/reports/
files: coverage-default.xml,coverage-optional.xml
directory: coverage
files: coverage-core.xml
env_vars: OS,PYTHON
fail_ci_if_error: false
flags: core
name: codecov-aiopenapi3
verbose: true
- name: Upload coverage to Codecov (tests)

- name: Upload coverage to Codecov (extra)
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: ./coverage/reports/
files: coverage-default-tests.xml,coverage-optional-tests.xml
directory: coverage
files: coverage-extra.xml
env_vars: OS,PYTHON
fail_ci_if_error: false
flags: tests
name: codecov-aiopenapi3-tests
flags: extras
name: codecov-aiopenapi3-extras
verbose: true
23 changes: 0 additions & 23 deletions .github/workflows/pdm.yml

This file was deleted.

8 changes: 4 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ jobs:
id-token: write
steps:
- uses: actions/checkout@v3
- uses: pdm-project/setup-pdm@v4
- uses: astral-sh/setup-uv@v5
- name: Publish package distributions to test.PyPI
run: pdm publish --repository testpypi
run: uv publish --index testpypi

pypi-publish:
name: upload release to PyPI
Expand All @@ -26,6 +26,6 @@ jobs:
id-token: write
steps:
- uses: actions/checkout@v3
- uses: pdm-project/setup-pdm@v4
- uses: astral-sh/setup-uv@v5
- name: Publish package distributions to PyPI
run: pdm publish
run: uv publish
26 changes: 12 additions & 14 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -102,17 +102,16 @@ log_cli_date_format = "%Y-%m-%d %H:%M:%S"

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

[tool.pdm.dev-dependencies]
tests = [
[tool.uv]
dev-dependencies = [
"pytest",
"pytest-asyncio>=0.24.0",
"pytest-httpx",
"pytest-cov",
"pytest-mock",
"fastapi",
"fastapi-versioning",
"uvloop == 0.21.0b1; python_version >= '3.13'",
"uvloop; python_version < '3.13'",
"uvloop",
"flask",
"flask_wtf",
"wtforms",
Expand All @@ -122,19 +121,18 @@ tests = [
"bootstrap-flask",
"ijson",
"python-multipart>=0.0.6",
"pydantic-extra-types @ git+https://github.com/pydantic/pydantic-extra-types.git@3668b3af8ab378c56342c613672aa9415dab865b"
"pydantic-extra-types>=2.10.1"
]

[tool.pdm]
plugins = [
"pdm-autoexport"
]

[[tool.pdm.autoexport]]
filename = "requirements.txt"
groups = ["default"]
without-hashes = "true"
[[tool.uv.index]]
name = "pypi"
url = "https://pypi.org/simple/"
publish-url = "https://pypi.org/legacy/"

[[tool.uv.index]]
name = "testpypi"
url = "https://test.pypi.org/simple/"
publish-url = "https://test.pypi.org/legacy/"

[tool.mypy]
allow_redefinition = true
Expand Down
Loading