|
1 | 1 | # SPDX-License-Identifier: MIT |
2 | | -[tox] |
3 | | -envlist = |
4 | | - black, pylint, flake8, yamllint |
5 | | - py{26,27,36,37,38}, |
6 | | - custom |
7 | | -skipsdist = true |
8 | | -skip_missing_interpreters = true |
| 2 | +[lsr_config] |
| 3 | +lsr_enable = true |
9 | 4 |
|
10 | | -[testenv] |
11 | | -passenv = * |
12 | | -basepython = python3 |
13 | | -changedir = {toxinidir}/tests |
14 | | -# List common dependencies for Python interpreters here: |
15 | | -setenv = |
16 | | - PYTHONPATH = {toxinidir}/library:{toxinidir}/module_utils |
17 | | - LC_ALL = C.UTF-8 |
18 | | - SRC_MODULE_UTILS_DIR = {envsitepackagesdir}/ansible/module_utils |
19 | | - DEST_MODULE_UTILS_DIR = {toxinidir}/module_utils |
20 | | -deps = |
21 | | - py{26,27,36,37,38}: pytest-cov |
22 | | - py{27,36,37,38}: pytest>=3.5.1 |
23 | | - py26: pytest |
24 | | - py{26,27,36,37,38}: -rpytest_extra_requirements.txt |
25 | | -whitelist_externals = |
26 | | - bash |
27 | | -commands = |
28 | | - bash {toxinidir}/.travis/runpytest.sh \ |
29 | | - --durations=5 \ |
30 | | - --cov={toxinidir}/library --cov={toxinidir}/module_utils \ |
31 | | - --cov-report=html:htmlcov-{envname} \ |
32 | | - --cov-report=term \ |
33 | | - {posargs} \ |
34 | | - unit |
| 5 | +[lsr_ansible-lint] |
| 6 | +configfile = {toxinidir}/.ansible-lint |
35 | 7 |
|
36 | | -[base] |
37 | | - |
38 | | -[testenv:py26] |
39 | | -envdir = {toxworkdir}/env-{env:TRAVIS_PYTHON_VERSION:2.6} |
40 | | -install_command = |
41 | | - pip install {opts} {packages} |
42 | | -list_dependencies_command = |
43 | | - pip freeze |
44 | | -basepython = python2.6 |
45 | | - |
46 | | -[testenv:py27] |
47 | | -envdir = {toxworkdir}/env-{env:TRAVIS_PYTHON_VERSION:2.7} |
48 | | -basepython = python2.7 |
49 | | - |
50 | | -[testenv:py36] |
51 | | -envdir = {toxworkdir}/env-{env:TRAVIS_PYTHON_VERSION:3.6} |
52 | | -basepython = python3.6 |
53 | | - |
54 | | -[testenv:py37] |
55 | | -envdir = {toxworkdir}/env-{env:TRAVIS_PYTHON_VERSION:3.7} |
56 | | -basepython = python3.7 |
57 | | - |
58 | | -[testenv:py38] |
59 | | -envdir = {toxworkdir}/env-{env:TRAVIS_PYTHON_VERSION:3.8} |
60 | | -basepython = python3.8 |
61 | | - |
62 | | -[testenv:black] |
63 | | -envdir = {toxworkdir}/env-{env:TRAVIS_PYTHON_VERSION:3.6} |
64 | | -basepython = python3.6 |
65 | | -passenv = RUN_BLACK_* |
66 | | -changedir = {toxinidir} |
67 | | -deps = |
68 | | - black |
69 | | -commands = |
70 | | - bash {toxinidir}/.travis/runblack.sh --check --diff . |
71 | | - |
72 | | -[testenv:pylint] |
73 | | -envdir = {toxworkdir}/env-{env:TRAVIS_PYTHON_VERSION:2.7} |
74 | | -basepython = python2.7 |
75 | | -passenv = RUN_PYLINT_* |
76 | | -changedir = {toxinidir} |
77 | | -deps = |
78 | | - ansible |
79 | | - colorama |
80 | | - pylint>=1.8.4 |
81 | | - -rpylint_extra_requirements.txt |
82 | | -commands = |
83 | | - bash {toxinidir}/.travis/runpylint.sh --errors-only {posargs} |
84 | | - |
85 | | -[testenv:flake8] |
86 | | -envdir = {toxworkdir}/env-{env:TRAVIS_PYTHON_VERSION:2.7} |
87 | | -basepython = python2.7 |
88 | | -passenv = RUN_FLAKE8_* |
89 | | -changedir = {toxinidir} |
90 | | -deps = |
91 | | - flake8>=3.5 |
92 | | -commands = |
93 | | - bash {toxinidir}/.travis/runflake8.sh {posargs} . |
94 | | - |
95 | | -[testenv:yamllint] |
96 | | -changedir = {toxinidir} |
97 | | -deps = yamllint |
98 | | -commands = yamllint . |
99 | | - |
100 | | -[testenv:coveralls] |
101 | | -envdir = {toxworkdir}/env-{env:TRAVIS_PYTHON_VERSION:coveralls} |
102 | | -passenv = TRAVIS TRAVIS_* |
103 | | -deps = |
104 | | - coveralls |
105 | | -commands = |
106 | | - bash {toxinidir}/.travis/runcoveralls.sh {posargs} |
107 | | - |
108 | | -[molecule_common] |
109 | | -changedir = {toxinidir} |
110 | | -deps = |
111 | | - ansible-lint==4.3.5 |
112 | | - {env:LSR_ANSIBLE_DEP:ansible} |
113 | | - docker |
114 | | - molecule<3 |
115 | | - selinux |
116 | | - wcwidth==0.1.9;python_version=="3.6" |
117 | | - -rmolecule_extra_requirements.txt |
118 | | -runsyspycmd = {toxinidir}/.travis/runsyspycmd.sh |
119 | | - |
120 | | -[testenv:molecule_version] |
121 | | -changedir = {[molecule_common]changedir} |
122 | | -envdir = {toxworkdir}/env-{env:TRAVIS_PYTHON_VERSION:molecule} |
123 | | -deps = |
124 | | - {[molecule_common]deps} |
125 | | -commands = |
126 | | - bash {[molecule_common]runsyspycmd} molecule --version |
127 | | - bash {[molecule_common]runsyspycmd} ansible --version |
128 | | - |
129 | | -[testenv:molecule_lint] |
130 | | -changedir = {[molecule_common]changedir} |
131 | | -envdir = {toxworkdir}/env-{env:TRAVIS_PYTHON_VERSION:molecule} |
132 | | -deps = |
133 | | - {[molecule_common]deps} |
134 | | -commands = |
135 | | - bash {[molecule_common]runsyspycmd} \ |
136 | | - molecule lint -s {env:LSR_MSCENARIO:default} {posargs} |
137 | | - |
138 | | -[testenv:molecule_syntax] |
139 | | -changedir = {[molecule_common]changedir} |
140 | | -envdir = {toxworkdir}/env-{env:TRAVIS_PYTHON_VERSION:molecule} |
141 | | -deps = |
142 | | - {[molecule_common]deps} |
143 | | -commands = |
144 | | - bash {[molecule_common]runsyspycmd} \ |
145 | | - molecule syntax -s {env:LSR_MSCENARIO:default} {posargs} |
146 | | - |
147 | | -[testenv:molecule_test] |
148 | | -changedir = {[molecule_common]changedir} |
149 | | -envdir = {toxworkdir}/env-{env:TRAVIS_PYTHON_VERSION:molecule} |
150 | | -deps = |
151 | | - {[molecule_common]deps} |
152 | | -commands = |
153 | | - bash {[molecule_common]runsyspycmd} \ |
154 | | - molecule test -s {env:LSR_MSCENARIO:default} {posargs} |
155 | | - |
156 | | -[testenv:molecule] |
157 | | -changedir = {[molecule_common]changedir} |
158 | | -envdir = {toxworkdir}/env-{env:TRAVIS_PYTHON_VERSION:molecule} |
159 | | -deps = |
160 | | - {[molecule_common]deps} |
161 | | -commands = |
162 | | - {[testenv:molecule_version]commands} |
163 | | - {[testenv:molecule_lint]commands} |
164 | | - {[testenv:molecule_syntax]commands} |
165 | | - {[testenv:molecule_test]commands} |
166 | | - |
167 | | -[testenv:custom] |
168 | | -changedir = {toxinidir} |
169 | | -envdir = {toxworkdir}/env-{env:TRAVIS_PYTHON_VERSION:custom} |
170 | | -deps = |
171 | | - -rcustom_requirements.txt |
172 | | -commands = |
173 | | - bash {toxinidir}/.travis/custom.sh |
174 | | - |
175 | | -[pytest] |
176 | | -addopts = -rxs |
177 | | - |
178 | | -[flake8] |
179 | | -show_source = true |
180 | | -max-line-length = 88 |
181 | | -ignore = E402,W503 |
182 | | -exclude = .venv,.tox |
183 | | -statistics = true |
184 | | -#verbose = 3 |
185 | | - |
186 | | -[pylint] |
187 | | -max-line-length = 88 |
188 | | -disable = wrong-import-position |
189 | | - |
190 | | -[pycodestyle] |
191 | | -max-line-length = 88 |
192 | | - |
193 | | -[travis] |
194 | | -python = |
195 | | - 2.6: py26,coveralls,custom |
196 | | - 2.7: py27,coveralls,flake8,pylint,custom |
197 | | - 3.6: py36,coveralls,black,yamllint,custom |
198 | | - 3.7: py37,coveralls,custom |
199 | | - 3.8: py38,coveralls,custom |
200 | | - 3.8-dev: py38,coveralls,custom |
| 8 | +[lsr_pylint] |
| 9 | +configfile = {toxinidir}/pylintrc |
0 commit comments