Skip to content

Commit

Permalink
Merge pull request #32 from ufcg-lsd/tests_coverage
Browse files Browse the repository at this point in the history
Added tox configuration to check tests coverage
  • Loading branch information
armstrongmsg authored Apr 30, 2020
2 parents 1746c46 + eb5acfa commit 11e5f08
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
6 changes: 6 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ pipeline {
sh 'tox -epep8'
}
}
stage('Coverage') {
agent any
steps {
sh 'tox -e coverage'
}
}
stage('Integration') {
agent any
steps {
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ mock
six
python-monascaclient==1.5.0
pytest
pytest-cov
requests_mock
kubernetes==8.0.0
flake8
Expand Down
9 changes: 8 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,21 @@
# and then run "tox" from this directory.

[tox]
envlist = py37, pep8
envlist = py37,pep8,coverage

[testenv]
usedevelop = True
commands = py.test
deps =
-r{toxinidir}/requirements.txt

[testenv:coverage]
basepython = python3.7
usedevelop = True
commands = py.test --cov=visualizer --cov=k8s-grafana --cov-report=term-missing visualizer/ k8s-grafana/
deps =
-r{toxinidir}/requirements.txt

[testenv:pep8]
commands =
flake8 {posargs}
Expand Down

0 comments on commit 11e5f08

Please sign in to comment.