diff --git a/.travis.yml b/.travis.yml index ce0399c28f..4f55ea00e8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,6 +10,8 @@ matrix: env: TOXENV=py37 - python: "3.7" env: TOXENV=lint + - python: "3.7" + env: TOXENV=report cache: directories: @@ -17,4 +19,4 @@ cache: install: pip install -U tox coveralls language: python script: tox -after_success: coveralls \ No newline at end of file +after_success: coveralls diff --git a/tox.ini b/tox.ini index 562e4a7c04..95cef69970 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py36,py37,lint +envlist = py36,py37,lint,cov,report [testenv] basepython = {env:PYTHON3_PATH:python3} @@ -9,9 +9,29 @@ deps= setenv = PYTHONPATH = {toxinidir} commands = - pytest {posargs} armi + pytest {posargs} armi -[testenv:pylint] +[testenv:cov] +deps= + -r{toxinidir}/requirements.txt + -r{toxinidir}/requirements-testing.txt +commands = + pytest --cov=armi {posargs} armi + +[testenv:lint] ignore_errors = true commands = - pylint armi --rcfile={toxinidir}/pylintrc + +[testenv:report] +skip_install = true +command = + coverage report + coverage html +depends = + cov + +[testenv:clean] +deps = coverage +skip_install = true +commands = coverage erase