Support multiple Molecule scenarios

Other changes:
- run linters before tests
- return [pylint] and [pycodestyle] back on the list (some IDE's
  rely on this)
This commit is contained in:
Jiri Kucera 2019-08-19 12:48:30 +02:00
parent 42e0a0c64d
commit b9b3561653
2 changed files with 18 additions and 4 deletions

15
tox.ini
View file

@ -1,7 +1,7 @@
[tox]
envlist =
py{26,27,36,37,38},
black, pylint, flake8,
py{26,27,36,37,38},
molecule_{lint,syntax,test},
extra
skipsdist = true
@ -167,21 +167,21 @@ commands_pre =
molecule --version
ansible --version
commands =
molecule {posargs} lint
molecule lint -s {env:LSR_MSCENARIO:default} {posargs}
[testenv:molecule_syntax]
envdir = {toxworkdir}/env-{env:TRAVIS_PYTHON_VERSION:molecule}
deps =
{[molecule]deps}
commands =
molecule {posargs} syntax
molecule syntax -s {env:LSR_MSCENARIO:default} {posargs}
[testenv:molecule_test]
envdir = {toxworkdir}/env-{env:TRAVIS_PYTHON_VERSION:molecule}
deps =
{[molecule]deps}
commands =
molecule {posargs} test
molecule test -s {env:LSR_MSCENARIO:default} {posargs}
# Here we provide a way how a role can add its custom command to be run. Such
# extra command is run at the end of each testenv run and is driven by
@ -225,6 +225,13 @@ show_source = true
max-line-length = 88
ignore = E402,W503
[pylint]
max-line-length = 88
disable = wrong-import-position
[pycodestyle]
max-line-length = 88
[travis]
python =
2.6: py26,extra