-
Notifications
You must be signed in to change notification settings - Fork 1
/
tox.ini
44 lines (38 loc) · 1.34 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
# 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.
# Python 3.6 was the version deployed on Ubuntu 18.04
# Python 3.8 is the version deployed on Ubuntu 20.04 servers such as triscotte
# Python 3.10 is the version deployed on the Ubuntu 22.04 master
[tox]
envlist = py, cov, codestyle
[gh-actions]
python =
3.8: py38, cov
3.10: py310, codestyle
[testenv]
deps =
pip-tools
-crequirements/production.txt
-crequirements/test.txt
# 'python -m piptools sync' guarantees that the test environment only contains
# pinned dependencies (it will uninstall dependencies that are not in
# requirements/*.txt).
constrain_package_deps = true
commands_pre =
python -m piptools sync requirements/production.txt requirements/test.txt
commands = pytest {posargs}
[testenv:cov]
commands = pytest --cov --cov-config=setup.cfg \
--cov-report=term --cov-report=xml {posargs}
deps =
{[testenv]deps}
pytest-cov
[testenv:codestyle]
# pre-commit needs to clone Git repositories over https
passenv = http_proxy,https_proxy,no_proxy
commands_pre = # do not inherit the piptools command
commands = pre-commit run --all-files
deps =
pre-commit