-
Notifications
You must be signed in to change notification settings - Fork 75
/
tox.ini
94 lines (81 loc) · 2.47 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
[tox]
envlist = test, flake8, mypy, black, isort, reformat-gherkin, shellcheck
[testenv:test]
deps: -rrequirements.test.txt
commands: py.test --junitxml=pytest_results.xml {posargs:--cov uaclient uaclient}
[testenv:flake8]
deps: flake8
commands: flake8 uaclient lib setup.py features
[testenv:mypy]
deps =
mypy
types-paramiko
types-pycurl
types-PyYAML
types-requests
types-toml
commands: mypy uaclient/ features/ lib/
[testenv:black]
# The following version is also in .pre-commit-config.yaml;
# make sure to update both together
deps: black==24.3.0
commands: black --check --diff uaclient/ features/ lib/ setup.py
[testenv:isort]
# The following version is also in .pre-commit-config.yaml;
# make sure to update both together
deps: isort==5.12.0
commands: isort --check --diff uaclient/ features/ lib/ setup.py
[testenv:reformat-gherkin]
# The following version is also in .pre-commit-config.yaml;
# make sure to update both together
deps: reformat-gherkin==3.0.1
commands: reformat-gherkin --check features/
[testenv:shellcheck]
allowlist_externals=/usr/bin/bash
# The following version is also in .pre-commit-config.yaml;
# make sure to update both together
deps: shellcheck-py==0.9.0.6
commands: bash -O extglob -O nullglob -c "shellcheck -S warning tools/*.sh debian/*.{config,postinst,postrm,prerm} lib/*.sh sru/*.sh update-motd.d/*"
[testenv:bandit]
deps: bandit
commands: bandit -r {posargs:uaclient lib apport}
[testenv:pylint]
deps: pylint
commands: pylint {posargs:uaclient lib apport}
[testenv:behave]
deps =
behave
jsonschema
jq
pycloudlib==1!9.2.0
PyHamcrest
requests
toml==0.10
ipdb
passenv =
PYCLOUDLIB_CONFIG
GCE_CREDENTIALS_PATH
AZURE_CONFIG_DIR
UACLIENT_BEHAVE_*
https_proxy
commands: behave -v {posargs}
[flake8]
# E251: Older versions of flake8 et al don't permit the
# now-recommended-by-PEP-8 parameter spacing for annotated function
# arguments with defaults (e.g. `def spam(ham: str = "eggs"):`).
# E203/W503:
# Per https://black.readthedocs.io/en/stable/the_black_code_style.html,
# W503 and E203 are not PEP 8 compliant and are therefore incompatible
# with black.
ignore = E203,E251,W503
[pytest]
log_format = %(filename)-25s %(lineno)4d %(levelname)-8s %(message)s
filterwarnings = ignore::DeprecationWarning
[behave]
logging_level=info
logging_format=%(asctime)s:%(levelname)s:%(name)s:%(message)s
log_capture=no
stdout_capture=no
stderr_capture=no
show_skipped=no
junit=true