forked from ni/nidaqmx-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
38 lines (33 loc) · 1.24 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
# Tox (http://tox.testrun.org/) 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]
isolated_build = true
envlist = clean, py{38,39,310,311,312}-base, py{38,39,310,311,312}-grpc, report, docs
[testenv]
skip_install = true
allowlist_externals = poetry
setenv =
base: INSTALL_OPTS=--only main,test
grpc: INSTALL_OPTS=--only main,test --extras grpc
base: PYTEST_OPTS=-k "not grpc"
grpc: PYTEST_OPTS=
commands =
poetry run python --version
poetry install -v {env:INSTALL_OPTS}
poetry run pytest --quiet --cov=generated/nidaqmx --cov-append --cov-report= --junitxml=test_results/system-{envname}.xml {env:PYTEST_OPTS} {posargs}
[testenv:clean]
commands = poetry run coverage erase
[testenv:report]
commands =
poetry run coverage html
poetry run coverage report
[testenv:docs]
# base_python should match the version specified in .readthedocs.yml and the PR workflow.
base_python = python3.9
commands =
poetry run python --version
poetry install -v --only main --extras docs
# Use -W to treat warnings as errors.
poetry run sphinx-build -b html -W docs docs/_build