Skip to content

Commit 739d389

Browse files
committed
Fix codecov on Travis CI
The coverage report needs to be explicitly created with arguments passed in to pytest-cov
1 parent 6fb96e9 commit 739d389

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@ script:
3131

3232
after_success:
3333
- pip install codecov
34-
- codecov
34+
- codecov -e TOX_ENV

runtests.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,11 @@ def is_class(string):
9393
except ValueError:
9494
pass
9595
else:
96-
pytest_args = ['--cov', 'rest_framework'] + pytest_args
96+
pytest_args = [
97+
'--cov-report',
98+
'xml',
99+
'--cov',
100+
'rest_framework'] + pytest_args
97101

98102
if first_arg.startswith('-'):
99103
# `runtests.py [flags]`

0 commit comments

Comments
 (0)