forked from secure-systems-lab/securesystemslib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
62 lines (51 loc) · 1.7 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
# 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]
envlist = lint, py37, py38, py39, py310, py311, purepy311, py311-no-gpg, py311-test-gpg-fails
skipsdist = True
[testenv]
install_command =
pip install {opts} {packages}
deps =
-r{toxinidir}/requirements-pinned.txt
-r{toxinidir}/requirements-test.txt
commands =
python -m tests.check_gpg_available
coverage run tests/aggregate_tests.py
coverage report -m --fail-under 96
[testenv:purepy311]
deps =
commands =
python -m tests.check_gpg_available
python -m tests.check_public_interfaces
[testenv:py311-no-gpg]
setenv =
GNUPG = nonexisting-gpg-for-testing
commands =
python -m tests.check_public_interfaces_gpg
[testenv:kms]
deps =
-r{toxinidir}/requirements-pinned.txt
-r{toxinidir}/requirements-kms.txt
passenv =
GOOGLE_APPLICATION_CREDENTIALS
commands =
python -m tests.check_kms_signers
# This checks that importing securesystemslib.gpg.constants doesn't shell out on
# import.
[testenv:py311-test-gpg-fails]
setenv =
GNUPG = false
commands =
python -c "import securesystemslib.gpg.constants"
[testenv:lint]
commands =
# TODO: Move configs to pyproject.toml
black --check --diff --line-length=80 --extend-exclude=_vendor .
isort --check --diff --line-length=80 --extend-skip-glob='*/_vendor/*' \
--profile=black --project=securesystemslib .
pylint -j 0 --rcfile=pylintrc securesystemslib tests
bandit --recursive securesystemslib --exclude _vendor
mypy