jenkins-bot has submitted this change and it was merged.
Change subject: Add coverage in travis builds ......................................................................
Add coverage in travis builds
It's based on the help in codecov.io [1]
[1]: https://github.com/codecov/example-python
Bug: T74863 Change-Id: I23a13a4664943044baa47ac501d498d28d0e977f --- M .travis.yml M dev-requirements.txt 2 files changed, 8 insertions(+), 3 deletions(-)
Approvals: John Vandenberg: Looks good to me, approved jenkins-bot: Verified
diff --git a/.travis.yml b/.travis.yml index 01b04ad..b80851a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -90,14 +90,17 @@ nosetests --version ; if [[ "$SITE_ONLY" == "1" ]]; then echo "Running site tests only code ${LANGUAGE} on family ${FAMILY}" ; - python setup.py nosetests --tests tests --verbosity=2 -a "family=$FAMILY,code=$LANGUAGE" ; + python setup.py nosetests --tests tests --verbosity=2 -a "family=$FAMILY,code=$LANGUAGE" --with-coverage --cover-package=. ; else - python setup.py nosetests --tests tests --verbosity=2 ; + python setup.py nosetests --tests tests --verbosity=2 --with-coverage --cover-package=. ; fi ; else - python setup.py test ; + coverage run setup.py test ; fi
+after_success: + codecov + env: global: # This is the encrypted password for Wikimedia SUL user 'Pywikibot-test', diff --git a/dev-requirements.txt b/dev-requirements.txt index 7329c3f..373c987 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -10,6 +10,8 @@ pep257>=0.6 pyflakes>=0.9 flake8 +codecov +coverage
# pywin32 & pywinauto>=0.4.0 are Win32 UI test dependencies that have been # excluded from this file as they are quite expensive to install, and they
pywikibot-commits@lists.wikimedia.org