-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
31 lines (26 loc) · 1001 Bytes
/
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
# tox (https://tox.readthedocs.io/) is a tool for running tests
# in multiple virtualenvs. This configuration file will run the
# 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 = py39, py310
isolated_build = True
[tox:.package]
basepython = python3
[testenv]
deps = poetry
allowlist_externals =
bash
pyright
setenv = PYTHONPATH = {toxinidir}/src
commands =
# Save all dependencies (including dev) into a text file.
poetry export --format requirements.txt --output requirements.txt --without-hashes --dev
# Install all dependencies listed in text file to the test environment.
pip install --requirement requirements.txt
# Run pyright
pyright . --lib
# Run tests
pytest --junitxml=tox_pytest_results_models_{envname}.xml --junit-prefix={envname}