-
Notifications
You must be signed in to change notification settings - Fork 2
/
tox.ini
84 lines (77 loc) · 2.01 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
[tox]
skipsdist = False
envlist = lint,unit,functional
[testenv]
usedevelop = True
sitepackages = True
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
setenv =
PYTHONPATH = {toxinidir}
QUEUE_LOG_LEVEL = DEBUG
QUEUE_CONSOLE_OUTPUT = t
PIPELINE_USER_PATH = dcipipeline/pipeline_user.yml
DCI_PIPELINE_CONF = dcipipeline/dci_pipeline.conf
DCI_QUEUE_LOG_LEVEL = DEBUG
DCI_QUEUE_CONSOLE_OUTPUT = t
[testenv:functional]
basepython = python3
commands =
dci-queue add-pool mypool
dci-queue add-resource mypool res1
dci-queue schedule mypool echo @RESOURCE
dci-queue run mypool
dci-queue remove-pool mypool
pytest -v tests/e2e
dci-rebuild-pipeline
# be sure to have 2 identical pipelines before calling dci-diff-pipeline
dci-pipeline
dci-pipeline
dci-diff-pipeline
dci-agent-ctl
setenv =
DCI_VAULT_CLIENT = {toxinidir}/.tox/functional/bin/dci-vault-client
DCI_API_SECRET = fakesecret
DCI_LOGIN = pipeline-user
DCI_PASSWORD = pipeline-user
passenv = ANSIBLE_*
[testenv:lint]
basepython = python3
skip_install = True
deps = flake8
flake8-colors
black
commands =
black --check .
flake8
allowlist_externals =
black
flake8
[testenv:unit]
commands =
pytest -v dcipipeline dciqueue dciagent
setenv =
DCI_VAULT_CLIENT = {toxinidir}/.tox/unit/bin/dci-vault-client
DCI_API_SECRET = fakesecret
[flake8]
# E501: line too long (80 chars)
# W503: line break before binary operator
# W504: line break occurred after a binary operator
# E203: whitespace before ':'
exclude = .tox
show-source = True
ignore = E501, W503, W504, E203
max-line-length = 99
application-import-names = dcipipeline dciqueue
[testenv:black]
basepython = python3
skip_install = True
deps = black
commands = black .
allowlist_externals = black
[testenv:pre-commit]
basepython = python3
skip_install = True
deps = pre-commit
commands = pre-commit install
allowlist_externals = pre-commit