-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathtox.ini
77 lines (67 loc) · 1.71 KB
/
tox.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
[tox]
envlist =
py38pyd1
py38pyd2
py39pyd1
py39pyd2
py310pyd1
py310pyd2
setenv = VIRTUALENV_DISCOVERY=pyenv
[testenv]
allowlist_externals = poetry
[testenv:py38-duration]
basepython = python3.8
commands_pre =
poetry install --no-root --sync
commands =
poetry run pytest --durations=20 tests/pydantic_v1
[testenv:py38pyd1]
basepython = python3.8
commands_pre =
poetry install --no-root --sync
commands =
poetry run pytest tests/pydantic_v1 tests/common
[testenv:py38pyd2]
commands_pre =
poetry install --no-root --sync
pip install pydantic==2.*
basepython = python3.8
commands =
poetry run pytest tests/pydantic_v2 tests/common
[testenv:py39pyd1]
basepython = python3.9
commands_pre =
poetry install --no-root --sync
commands =
poetry run pytest tests/pydantic_v1 tests/common
[testenv:py39pyd2]
commands_pre =
poetry install --no-root --sync
pip install pydantic==2.*
basepython = python3.9
commands =
poetry run pytest tests/pydantic_v2 tests/common
[testenv:py310pyd1]
basepython = python3.10
commands_pre =
poetry install --no-root --sync
commands =
; poetry run pytest tests/pydantic_v1
poetry run coverage run --data-file=./cov/.result1 -m pytest tests/pydantic_v1
; poetry run coverage xml -o ./cov/coverage.xml
[testenv:py310pyd2]
basepython = python3.10
commands_pre =
poetry install --no-root --sync
pip install pydantic==2.*
commands =
; poetry run pytest tests/pydantic_v2
poetry run coverage run --data-file=./cov/.result2 -m pytest tests/pydantic_v2
[testenv:coverage]
description = Combine coverage data and generate report
skip_install = true
deps = coverage
commands =
coverage combine cov/.result1 cov/.result2
coverage report -m
coverage html