Skip to content

Commit a63cddb

Browse files
authored
ci: fix coverage reporting (#408)
* ci: fix coverage reporting Add "cov" tox factor, which should get used by tox-travis then. * move --cov-append to tox factor * use pypy-cov * tox: add py37, py38 to envlist for tox-travis to use py37-cov * add .codecov.yml to disable comments
1 parent ba801c7 commit a63cddb

File tree

4 files changed

+23
-2
lines changed

4 files changed

+23
-2
lines changed

.codecov.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
coverage:
2+
status:
3+
project: true
4+
patch: true
5+
changes: true
6+
comment: false

.coveragerc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[run]
2+
source = .
3+
branch = true
4+
5+
[report]
6+
show_missing = true
7+
include = pynvim/*,test/*

.travis.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,8 @@ script:
3131
- tox
3232
after_script:
3333
- if [ $CI_TARGET = tests ]; then
34+
coverage report -m;
35+
coverage xml;
36+
bash <(curl --retry 5 --silent --fail https://codecov.io/bash) -f coverage.xml;
3437
ocular;
3538
fi

tox.ini

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,21 @@
11
[tox]
22
envlist =
3-
py{27,34,35,36}-{asyncio,pyuv},pypy
3+
py{27,34,35,36,37,38}-{asyncio,pyuv}-cov,pypy-cov
44
py36-docs
55
checkqa
66

77
[testenv]
88
extras = test
99
deps =
1010
pytest-timeout
11+
cov: pytest-cov
1112
pyuv: pyuv
13+
setenv =
14+
cov: PYTEST_ADDOPTS=--cov=. --cov-append {env:PYTEST_ADDOPTS:}
1215
passenv = PYTEST_ADDOPTS
13-
commands = python -m pytest {posargs}
16+
commands =
17+
cov: coverage erase
18+
python -m pytest {posargs}
1419

1520
[testenv:checkqa]
1621
deps =

0 commit comments

Comments
 (0)