forked from theupdateframework/python-tuf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
54 lines (44 loc) · 1.82 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
# Tox (https://tox.readthedocs.io/en/latest/) 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 = lint,py{37,38,39,310}
skipsdist = true
[testenv]
# TODO: Consider refactoring the tests to not require the aggregation script
# being invoked from the `tests` directory. This seems to be the convention and
# would make use of other testing tools such as coverage/coveralls easier.
changedir = tests
commands =
python3 --version
python3 generated_data/generate_md.py
python3 -m coverage run aggregate_tests.py
python3 -m coverage report -m --fail-under 94
deps =
-r{toxinidir}/requirements-test.txt
# Install TUF in editable mode, instead of tox default virtual environment
# installation (see `skipsdist`), to get relative paths in coverage reports
--editable {toxinidir}
install_command = python3 -m pip install {opts} {packages}
# Develop test env to run tests against securesystemslib's master branch
# Must to be invoked explicitly with, e.g. `tox -e with-sslib-master`
[testenv:with-sslib-master]
commands_pre =
python3 -m pip install git+https://github.com/secure-systems-lab/securesystemslib.git@master#egg=securesystemslib[crypto,pynacl]
commands =
python3 -m coverage run aggregate_tests.py
python3 -m coverage report -m
[testenv:lint]
changedir = {toxinidir}
lint_dirs = tuf/api tuf/ngclient examples tests
commands =
# Use different configs for new (tuf/api/*) and legacy code
black --check --diff {[testenv:lint]lint_dirs}
isort --check --diff {[testenv:lint]lint_dirs}
[testenv:docs]
deps =
-r{toxinidir}/requirements-docs.txt
changedir = {toxinidir}
commands =
sphinx-build -b html docs docs/build/html