mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2025-05-11 11:23:44 +03:00
Configure pipeline to run tests against different pydantic versions
This commit is contained in:
parent
b1d95267df
commit
6b627bee96
11
.github/workflows/tests-and-linters.yml
vendored
11
.github/workflows/tests-and-linters.yml
vendored
|
@ -36,6 +36,17 @@ jobs:
|
||||||
env:
|
env:
|
||||||
TOXENV: ${{ matrix.python-version }}
|
TOXENV: ${{ matrix.python-version }}
|
||||||
|
|
||||||
|
test-different-pydantic-versions:
|
||||||
|
name: Run tests with different pydantic versions
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- uses: actions/setup-python@v4
|
||||||
|
with:
|
||||||
|
python-version: "3.12"
|
||||||
|
- run: pip install tox
|
||||||
|
- run: tox -e pydantic-v1,pydantic-v2
|
||||||
|
|
||||||
test-coverage:
|
test-coverage:
|
||||||
name: Run tests with coverage
|
name: Run tests with coverage
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
23
tox.ini
23
tox.ini
|
@ -1,7 +1,7 @@
|
||||||
[tox]
|
[tox]
|
||||||
parallel_show_output = true
|
parallel_show_output = true
|
||||||
envlist=
|
envlist=
|
||||||
coveralls, pylint, flake8, pydocstyle, 3.7, 3.8, 3.9, 3.10, 3.11, 3.12, 3.13, pypy3.9, pypy3.10
|
coveralls, pylint, flake8, pydocstyle, pydantic-v1, pydantic-v2, 3.7, 3.8, 3.9, 3.10, 3.11, 3.12, 3.13, pypy3.9, pypy3.10
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
deps=
|
deps=
|
||||||
|
@ -29,6 +29,27 @@ setenv =
|
||||||
[testenv:.pkg]
|
[testenv:.pkg]
|
||||||
passenv = DEPENDENCY_INJECTOR_*
|
passenv = DEPENDENCY_INJECTOR_*
|
||||||
|
|
||||||
|
[testenv:pydantic-{v1,v2}]
|
||||||
|
description = run tests with different pydantic versions
|
||||||
|
base_python = python3.12
|
||||||
|
deps =
|
||||||
|
v1: pydantic<2
|
||||||
|
v2: pydantic-settings
|
||||||
|
pytest
|
||||||
|
pytest-asyncio
|
||||||
|
-rrequirements.txt
|
||||||
|
typing_extensions
|
||||||
|
httpx
|
||||||
|
fastapi
|
||||||
|
flask<2.2
|
||||||
|
aiohttp<=3.9.0b1
|
||||||
|
numpy
|
||||||
|
scipy
|
||||||
|
boto3
|
||||||
|
mypy_boto3_s3
|
||||||
|
werkzeug<=2.2.2
|
||||||
|
commands = pytest -c tests/.configs/pytest.ini -m pydantic
|
||||||
|
|
||||||
[testenv:coveralls]
|
[testenv:coveralls]
|
||||||
passenv = GITHUB_*, COVERALLS_*, DEPENDENCY_INJECTOR_*
|
passenv = GITHUB_*, COVERALLS_*, DEPENDENCY_INJECTOR_*
|
||||||
basepython=python3.12 # TODO: Upgrade to version 3.13 is blocked by coveralls 4.0.1 not supporting Python 3.13
|
basepython=python3.12 # TODO: Upgrade to version 3.13 is blocked by coveralls 4.0.1 not supporting Python 3.13
|
||||||
|
|
Loading…
Reference in New Issue
Block a user