-
Notifications
You must be signed in to change notification settings - Fork 8
/
tox.ini
66 lines (58 loc) · 1.78 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
[tox]
envlist = pep8,py3,mypy,lint
skipsdist = True
# NOTE: Avoid build/test env pollution by not enabling sitepackages.
sitepackages = False
# NOTE: Avoid false positives by not skipping missing interpreters.
skip_missing_interpreters = False
[gh-actions]
python =
3.8: py38
3.9: py39
3.10: py310, mypy, pep8, lint
[testenv]
setenv = VIRTUAL_ENV={envdir}
PYTHONHASHSEED=0
CHARM_DIR={envdir}
install_command =
pip install {opts} {packages}
[testenv:py3]
basepython = python3
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands = pytest --cov=./charmed_openstack_info/ {posargs} charmed_openstack_info/tests/
[testenv:pep8]
basepython = python3
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands = flake8 charmed_openstack_info {posargs}
[testenv:lint]
basepython = python3
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands = charmhub-lp-tool --config-dir ./charmed_openstack_info/data/lp-builder-config/ validate-config
[testenv:mypy]
basepython = python3
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands = mypy charmed_openstack_info {posargs}
[testenv:venv]
basepython = python3
usedevelop = True
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands = {posargs}
[flake8]
# H106: Don’t put vim configuration in source files
# H210: Require ‘autospec’, ‘spec’, or ‘spec_set’ in mock.patch/mock.patch.object calls
# H904: Delay string interpolations at logging calls
enable-extensions = H106,H210,H904
# E402: Module level import not at top of file
# H301: One import per line
# W504: Line break occurred after a binary operator
extend-ignore = E402,H301,W504