Skip to content

Commit 12d7b00

Browse files
committed
Run coverage on travis
1 parent d06d47b commit 12d7b00

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

requirements/testing.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ pytest==3.7.4
55
pytest-django==3.4.2
66
pytest-describe==0.11.1
77
pytest-xdist==1.23.0
8+
pytest-coverage
89
apipkg==1.5
910
execnet==1.5.0
1011

tox.ini

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ skipsdist = True
66
[travis]
77
python =
88
2.7: py27
9-
3.6: py36
9+
3.6: py36, coverage
1010

1111
[testenv]
1212
description = run test suite for the application with {basepython}
@@ -19,7 +19,7 @@ setenv =
1919
deps = -r{toxinidir}/requirements/testing.txt
2020
changedir = {toxinidir}/readthedocs
2121
commands =
22-
py.test {posargs}
22+
py.test --cov-report= --cov-config {toxinidir}/.coveragerc --cov=. {posargs}
2323

2424
[testenv:docs]
2525
description = build readthedocs documentation
@@ -54,11 +54,8 @@ commands =
5454
5555
[testenv:coverage]
5656
description = run test suite with code coverage for the application with {basepython}
57-
deps =
58-
-r{toxinidir}/requirements/testing.txt
59-
pytest-cov
57+
deps = coverage
6058
whitelist_externals = echo
6159
commands =
62-
py.test --disable-pytest-warnings \
63-
--cov-report=term --cov-report=html --cov-config {toxinidir}/.coveragerc --cov=. {posargs}
60+
coverage report --show-missing --fail-under=79
6461
echo Annotated HTML coverage report is in {toxinidir}/readthedocs/htmlcov/index.html

0 commit comments

Comments
 (0)