Add coverage testing
This commit is contained in:
parent
08940e1d94
commit
daccd02158
1
.gitignore
vendored
1
.gitignore
vendored
@ -45,6 +45,7 @@ pip-log.txt
|
||||
pip-delete-this-directory.txt
|
||||
|
||||
# Unit test / coverage reports
|
||||
cover/
|
||||
htmlcov/
|
||||
.tox/
|
||||
.coverage
|
||||
|
@ -3,6 +3,7 @@
|
||||
# process, which may cause wedges in the gate later.
|
||||
|
||||
ansible-lint>=3.0.0 # MIT
|
||||
coverage>=4.5.1 # Apache-2.0
|
||||
flake8>=3.5.0 # MIT
|
||||
# Required for Python 2
|
||||
mock>=2.0.0 # BSD
|
||||
|
13
tox.ini
13
tox.ini
@ -29,6 +29,19 @@ basepython = python2.7
|
||||
commands =
|
||||
flake8 {posargs}
|
||||
|
||||
[testenv:cover]
|
||||
basepython = python3
|
||||
setenv =
|
||||
VIRTUAL_ENV={envdir}
|
||||
PYTHON=coverage run --source tenks,ansible/action_plugins --parallel-mode
|
||||
commands =
|
||||
coverage erase
|
||||
stestr run {posargs}
|
||||
coverage combine
|
||||
coverage report
|
||||
coverage html -d cover
|
||||
coverage xml -o cover/coverage.xml
|
||||
|
||||
[testenv:alint]
|
||||
basepython = python2.7
|
||||
# ansible-lint doesn't support custom modules, so add ours to the Ansible path.
|
||||
|
Loading…
Reference in New Issue
Block a user