Merge pull request #4605 from stsewd/run-coverage
Run coverage on travishumitos/integrations/handle-error-codes
commit
a4291d1772
|
@ -0,0 +1,2 @@
|
|||
comment:
|
||||
layout: "diff, files"
|
16
.coveragerc
16
.coveragerc
|
@ -1,3 +1,19 @@
|
|||
[run]
|
||||
branch = true
|
||||
source = .
|
||||
omit =
|
||||
*/**/migrations/*
|
||||
*/**/management/commands/*
|
||||
*/**/settings/*
|
||||
*/**/settings.py
|
||||
analytics/vendor/*
|
||||
rtd_tests/*
|
||||
*/**/tests/**
|
||||
wsgi.py
|
||||
|
||||
[report]
|
||||
exclude_lines =
|
||||
if self.debug:
|
||||
pragma: no cover
|
||||
raise NotImplementedError
|
||||
if __name__ == .__main__.:
|
||||
|
|
|
@ -5,6 +5,7 @@ pytest==3.7.4
|
|||
pytest-django==3.4.2
|
||||
pytest-describe==0.11.1
|
||||
pytest-xdist==1.23.0
|
||||
pytest-cov
|
||||
apipkg==1.5
|
||||
execnet==1.5.0
|
||||
|
||||
|
|
20
tox.ini
20
tox.ini
|
@ -6,7 +6,7 @@ skipsdist = True
|
|||
[travis]
|
||||
python =
|
||||
2.7: py27
|
||||
3.6: py36
|
||||
3.6: py36, codecov
|
||||
|
||||
[testenv]
|
||||
description = run test suite for the application with {basepython}
|
||||
|
@ -16,10 +16,11 @@ setenv =
|
|||
LANG=C
|
||||
LC_CTYPE=C.UTF-8
|
||||
DJANGO_SETTINGS_SKIP_LOCAL=True
|
||||
passenv = CI TRAVIS TRAVIS_*
|
||||
deps = -r{toxinidir}/requirements/testing.txt
|
||||
changedir = {toxinidir}/readthedocs
|
||||
commands =
|
||||
py.test {posargs}
|
||||
py.test --cov-report= --cov-config {toxinidir}/.coveragerc --cov=. {posargs}
|
||||
|
||||
[testenv:docs]
|
||||
description = build readthedocs documentation
|
||||
|
@ -53,12 +54,15 @@ commands =
|
|||
npm run lint
|
||||
|
||||
[testenv:coverage]
|
||||
description = run test suite with code coverage for the application with {basepython}
|
||||
deps =
|
||||
-r{toxinidir}/requirements/testing.txt
|
||||
pytest-cov
|
||||
description = shows the coverage report
|
||||
deps = coverage
|
||||
whitelist_externals = echo
|
||||
commands =
|
||||
py.test --disable-pytest-warnings \
|
||||
--cov-report=term --cov-report=html --cov-config {toxinidir}/.coveragerc --cov=. {posargs}
|
||||
coverage report --show-missing
|
||||
coverage html
|
||||
echo Annotated HTML coverage report is in {toxinidir}/readthedocs/htmlcov/index.html
|
||||
|
||||
[testenv:codecov]
|
||||
description = upload coverage report
|
||||
deps = codecov
|
||||
commands = codecov
|
||||
|
|
Loading…
Reference in New Issue