From 739d3892c5e948264614eae719c0fd71645b936c Mon Sep 17 00:00:00 2001 From: Nic Young Date: Wed, 7 Oct 2015 22:20:46 -0700 Subject: [PATCH] Fix codecov on Travis CI The coverage report needs to be explicitly created with arguments passed in to pytest-cov --- .travis.yml | 2 +- runtests.py | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index e8561a7ac..67404d750 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,4 +31,4 @@ script: after_success: - pip install codecov - - codecov + - codecov -e TOX_ENV diff --git a/runtests.py b/runtests.py index 36a2183bd..504cd1d37 100755 --- a/runtests.py +++ b/runtests.py @@ -93,7 +93,11 @@ if __name__ == "__main__": except ValueError: pass else: - pytest_args = ['--cov', 'rest_framework'] + pytest_args + pytest_args = [ + '--cov-report', + 'xml', + '--cov', + 'rest_framework'] + pytest_args if first_arg.startswith('-'): # `runtests.py [flags]`