1
0
Fork 0
mirror of synced 2024-11-25 09:35:34 -05:00

Add code coverage reports

This commit is contained in:
Kurt McKee 2022-05-12 15:41:38 -05:00
parent 5c0ddc6fc1
commit 57a27a770c
2 changed files with 38 additions and 1 deletions

2
.gitignore vendored
View file

@ -1,7 +1,9 @@
*.egg-info *.egg-info
*.pyc *.pyc
.coverage*
.idea/ .idea/
.tox/ .tox/
.venv/ .venv/
build/ build/
dist/ dist/
htmlcov/

37
tox.ini
View file

@ -2,7 +2,9 @@
; On Windows, only CPython >= 3.8 is supported. ; On Windows, only CPython >= 3.8 is supported.
; All older versions, and PyPy, lack full symlink support. ; All older versions, and PyPy, lack full symlink support.
envlist = envlist =
coverage_erase
py{38, 39, 310}-all_platforms py{38, 39, 310}-all_platforms
coverage_report
py{27, 35, 36, 37}-most_platforms py{27, 35, 36, 37}-most_platforms
pypy{2, 3}-most_platforms pypy{2, 3}-most_platforms
py39-black py39-black
@ -20,9 +22,30 @@ deps =
pytest-randomly pytest-randomly
pyyaml pyyaml
mock; python_version == "2.7" mock; python_version == "2.7"
all_platforms: coverage
commands = commands =
pytest tests/ all_platforms: coverage run -m pytest
most_platforms: pytest tests/
[testenv:coverage_erase]
skipsdist = true
skip_install = true
deps = coverage
commands = coverage erase
[testenv:coverage_report]
skipsdist = true
skip_install = true
deps = coverage
commands_pre =
coverage combine
commands =
coverage report
coverage html
[testenv:py39-black] [testenv:py39-black]
@ -43,3 +66,15 @@ deps =
commands = commands =
isort --check dotbot/ tests/ isort --check dotbot/ tests/
[coverage:run]
branch = true
parallel = true
source =
dotbot/
tests/
[coverage:html]
directory = htmlcov