forked from canonical/ubuntu-pro-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
49 lines (45 loc) · 1.64 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
[tox]
envlist = test, flake8, mypy, black, isort, shellcheck
[testenv]
allowlist_externals=/usr/bin/bash
deps =
test,mypy,flake8: -rrequirements.txt
test,mypy,flake8: -rtest-requirements.txt
mypy: -rtypes-requirements.txt
black: -rdev-requirements.txt
isort: -rdev-requirements.txt
behave: -rintegration-requirements.txt
shellcheck: -rdev-requirements.txt
passenv =
PYCLOUDLIB_CONFIG
GCE_CREDENTIALS_PATH
AZURE_CONFIG_DIR
UACLIENT_BEHAVE_*
https_proxy
commands =
test: py.test --junitxml=pytest_results.xml {posargs:--cov uaclient uaclient}
flake8: flake8 uaclient lib setup.py features
mypy: mypy uaclient/ features/ lib/
black: black --check --diff uaclient/ features/ lib/ setup.py
isort: isort --check --diff uaclient/ features/ lib/ setup.py
shellcheck: bash -O extglob -O nullglob -c "shellcheck -S warning tools/*.sh debian/*.{config,postinst,postrm,prerm} lib/*.sh sru/*.sh update-motd.d/*"
behave: 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
[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