-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
75 lines (68 loc) · 1.81 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
# tox (https://tox.readthedocs.io/) is a tool for running tests
# in multiple virtualenvs. This configuration file will run the
# test suite on all supported python versions. To use it, "pip install tox"
# and then run "tox" from this directory.
[tox]
envlist = py{38,39,310,311},report
[gh-actions]
python =
3.8: py38
3.9: py39, report
3.10: py310
3.11: py311
[testenv]
install_command = python -I -m pip install --no-cache-dir
extras = tests
set_env =
PIP_INDEX_URL=https://pypi.org/simple/
deps =
pytest
pytest-cov
pytest-mypy
pytest-flakes
pytest-pycodestyle
pytest-recording
# and packages, required inside tests:
six
types-six
cloudpickle
# NB: its broken version, so we testing not compatability with deepspeed,
# but how we process this kind of broken packages (egg-info + entry-points)
deepspeed==0.12.6
file://{toxinidir}/tests/test_data/lzy_test_project
file://{toxinidir}/tests/test_data/lzy_test_project_meta
--editable=file://{toxinidir}/tests/test_data/lzy_test_project_editable
commands =
pytest \
--mypy \
--flakes \
--pycodestyle \
--doctest-modules \
--doctest-ignore-import-errors \
--cov envzy \
--cov-report= \ # supress cov report printing to console
--block-network \
{posargs}
[testenv:report]
basepython = python3.9
depends = py39
skip_install = true
deps =
coverage-badge
commands =
coverage report # just print report to console
coverage-badge -o coverage.svg -f
[testenv:vcr]
commands =
pytest \
--record-mode=once \
--block-network \
{posargs}
[pytest]
filterwarnings =
ignore:.*pkg_resources.*:DeprecationWarning
flakes-ignore =
tests/test_data ALL
[pycodestyle]
max-line-length = 120
statistics = True