Move all lints tests to consolidated 'linters' tox environment
OpenStack-Infra has requested that lint tests be pipelined into the 'linters' tox target in order to make more efficient use of nodepool resources. This patch: - adds a 'linters' target which executes all required lint tests. - removes previously seperated tox targets for lint tests. Change-Id: Ic9da217dc07ac7f8d71364b162793c0e4f4ba7ad
This commit is contained in:
parent
0cd7181a63
commit
cc7c5cc45f
31
tox.ini
31
tox.ini
@ -1,23 +1,12 @@
|
|||||||
[tox]
|
[tox]
|
||||||
minversion = 1.4.2
|
minversion = 1.4.2
|
||||||
envlist = ansible-lint,docs,pep8
|
envlist = docs,linters
|
||||||
skipsdist = True
|
skipsdist = True
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
deps = -r{toxinidir}/requirements.txt
|
deps = -r{toxinidir}/requirements.txt
|
||||||
-r{toxinidir}/test-requirements.txt
|
-r{toxinidir}/test-requirements.txt
|
||||||
|
|
||||||
[testenv:ansible-lint]
|
|
||||||
setenv =
|
|
||||||
ANSIBLE_CONFIG = tests/ansible.cfg
|
|
||||||
whitelist_externals = bash
|
|
||||||
commands =
|
|
||||||
bash -c "find . -type f -regex '.*.y[a]?ml' -print0 | xargs -t -n1 -0 \
|
|
||||||
ansible-lint"
|
|
||||||
bash -c "find tests -type f -regex '.*.y[a]?ml' -print | xargs -t -n1 \
|
|
||||||
ansible-playbook --syntax-check -i tests/inventory \
|
|
||||||
-e rolename=$(basename $(pwd)) > /dev/null"
|
|
||||||
|
|
||||||
[testenv:functional]
|
[testenv:functional]
|
||||||
commands =
|
commands =
|
||||||
ansible-playbook -i tests/inventory tests/test.yaml
|
ansible-playbook -i tests/inventory tests/test.yaml
|
||||||
@ -29,9 +18,6 @@ setenv =
|
|||||||
[testenv:docs]
|
[testenv:docs]
|
||||||
commands = python setup.py build_sphinx
|
commands = python setup.py build_sphinx
|
||||||
|
|
||||||
[testenv:pep8]
|
|
||||||
commands = flake8
|
|
||||||
|
|
||||||
[testenv:venv]
|
[testenv:venv]
|
||||||
commands = {posargs}
|
commands = {posargs}
|
||||||
|
|
||||||
@ -42,3 +28,18 @@ show-source = True
|
|||||||
ignore = E123,E125
|
ignore = E123,E125
|
||||||
builtins = _
|
builtins = _
|
||||||
exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build
|
exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build
|
||||||
|
|
||||||
|
[testenv:linters]
|
||||||
|
setenv =
|
||||||
|
ANSIBLE_CONFIG = tests/ansible.cfg
|
||||||
|
whitelist_externals = bash
|
||||||
|
commands =
|
||||||
|
# PEP8 Lint Check
|
||||||
|
flake8
|
||||||
|
# Ansible Lint Check
|
||||||
|
bash -c "find . -type f -regex '.*.y[a]?ml' -print0 | xargs -t -n1 -0 \
|
||||||
|
ansible-lint"
|
||||||
|
# Ansible Syntax Check
|
||||||
|
bash -c "find tests -type f -regex '.*.y[a]?ml' -print | xargs -t -n1 \
|
||||||
|
ansible-playbook --syntax-check -i tests/inventory \
|
||||||
|
-e rolename=$(basename $(pwd)) > /dev/null"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user