Skip to content

Commit 97331ca

Browse files
committed
ci: revisit coverage reporting, use codecov
1 parent d07cd2d commit 97331ca

File tree

3 files changed

+14
-20
lines changed

3 files changed

+14
-20
lines changed

.travis.yml

+7-11
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,16 @@ language: python
22
matrix:
33
include:
44
- python: 3.5
5-
env: TOX_ENV=py35
5+
env: TOXENV=py35-coverage
66
- python: 3.6
7-
env: TOX_ENV=py36
7+
env: TOXENV=py36-coverage
88
- python: 3.7
9-
env: TOX_ENV=py37
10-
# TODO: the dist and sudo keys are currently needed to use Python 3.7.
11-
# They should be removed once Travis-CI supports 3.7 on the default image.
12-
dist: xenial
13-
sudo: true
9+
env: TOXENV=py37-coverage
1410

15-
install: pip install tox-travis coveralls
11+
install: pip install tox
1612

17-
script: tox -e $TOX_ENV
13+
script: tox
1814

1915
after_success:
20-
- tox -e coverage-report
21-
- coveralls
16+
- curl -S -L --connect-timeout 5 --retry 6 -s https://codecov.io/bash -o codecov-upload.sh
17+
- bash codecov-upload.sh -Z -X fix -f coverage.xml

setup.py

-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ def find_version():
4444
extras_require={
4545
':python_version == "3.5"': "async_generator >= 1.3",
4646
"testing": [
47-
"coverage",
4847
"async_generator >= 1.3",
4948
"hypothesis >= 3.64",
5049
],

tox.ini

+7-8
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,10 @@ minversion = 2.5.0
44

55
[testenv]
66
extras = testing
7-
commands = coverage run -m pytest {posargs}
8-
9-
[testenv:coverage-report]
10-
deps = coverage
11-
skip_install = true
12-
commands =
13-
coverage combine
14-
coverage report
7+
deps =
8+
coverage: coverage
9+
commands = {env:COVERAGE_RUN:pytest} {posargs}
10+
coverage: coverage report -m
11+
coverage: coverage xml
12+
setenv =
13+
coverage: COVERAGE_RUN=coverage run -m pytest

0 commit comments

Comments
 (0)