generated from ansible-collections/collection_template
-
Notifications
You must be signed in to change notification settings - Fork 12
/
tox.ini
84 lines (70 loc) · 1.93 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]
minversion = 4.0.0
envlist = linters
skipsdist = True
[testenv]
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
install_command = pip install {opts} {packages}
[testenv:black]
deps =
black >=23.0, <24.0
commands =
black {toxinidir}/plugins {toxinidir}/tests
[testenv:add_docs]
deps = git+https://github.com/ansible-network/collection_prep
commands = collection_prep_add_docs -p .
[testenv:linters]
deps =
{[testenv:black]deps}
flake8
antsibull-changelog
antsibull-docs
antsibull
commands =
black -v --check {toxinidir}/plugins {toxinidir}/tests
flake8 {posargs} {toxinidir}/plugins {toxinidir}/tests
antsibull-changelog lint
antsibull-docs lint-collection-docs {toxinidir}
[testenv:antsibull-changelog]
deps =
antsibull-changelog
commands =
antsibull-changelog {posargs}
[testenv:venv]
commands = {posargs}
[testenv:pytest]
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
pytest
commands =
mkdir -p {envdir}/lib/python3.9/site-packages/ansible_collections/ansible/cloud
cp -pr plugins {envdir}/lib/python3.9/site-packages/ansible_collections/ansible/cloud
py.test -v {posargs}
whitelist_externals =
mkdir
cp
touch
[testenv:py39-sanity]
deps = ansible
commands = ansible-test sanity --debug --requirements --local --skip-test future-import-boilerplate --skip-test metaclass-boilerplate --python 3.9
setenv =
HOME = /tmp
[flake8]
# E123, E125 skipped as they are invalid PEP-8.
show-source = True
ignore = E123,E125,E203,E402,E501,E741,F401,F811,F841,W503
max-line-length = 160
builtins = _
exclude = .git,.tox,tests/unit/compat/
[testenv:prepare_release]
deps =
pyyaml
antsibull-changelog
allowlist_externals =
{toxinidir}/tools/update_constants.py
commands =
{toxinidir}/tools/update_constants.py --path {toxinidir}
antsibull-changelog release --verbose --version '{env:RELEASE_VERSION}'
passenv =
RELEASE_VERSION