File tree Expand file tree Collapse file tree 4 files changed +25
-2
lines changed Expand file tree Collapse file tree 4 files changed +25
-2
lines changed Original file line number Diff line number Diff line change 1+ [run]
2+ omit =
3+ *test*
4+
5+ [report]
6+ exclude_lines =
7+ pragma: no cover
8+ def __repr__
9+ raise NotImplementedError
10+ if __name__ == .__main__.:
Original file line number Diff line number Diff line change @@ -9,9 +9,11 @@ services:
99
1010before_install :
1111 - travis_retry sudo apt update -qq
12- - travis_retry sudo apt install -qq --no-install-recommends python2.7 python3 python3-venv python3-virtualenv
12+ # to successfully send the coveralls reports we need pyOpenSSL
13+ - travis_retry sudo apt install -qq --no-install-recommends python2.7 python3 python3-venv python3-virtualenv python3-setuptools python3-pip python3-openssl
1314 # (venv/virtualenv are both used by tests/test_pythonpackage.py)
1415 - sudo pip install tox>=2.0
16+ - sudo pip3 install coveralls
1517 # https://github.com/travis-ci/travis-ci/issues/6069#issuecomment-266546552
1618 - git remote set-branches --add origin master
1719 - git fetch
@@ -39,6 +41,8 @@ script:
3941 # case that the travis log doesn't produce any output for more than 10 minutes
4042 - while sleep 540; do echo "==== Still running (travis, don't kill me) ===="; done &
4143 - docker build --tag=p4a --file Dockerfile.py3 .
42- - docker run -e CI p4a /bin/sh -c "$COMMAND"
44+ - docker run -e CI -e TRAVIS_JOB_ID="$TRAVIS_JOB_ID" -e TRAVIS_BRANCH="$TRAVIS_BRANCH" p4a /bin/sh -c "$COMMAND"
4345 # kill the background process started before run docker
4446 - kill %1
47+ after_success :
48+ - coveralls
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ python-for-android
22==================
33
44[ ![ Build Status] ( https://travis-ci.org/kivy/python-for-android.svg?branch=master )] ( https://travis-ci.org/kivy/python-for-android )
5+ [ ![ Coverage Status] ( https://coveralls.io/repos/github/kivy/python-for-android/badge.svg?branch=master&kill_cache=1 )] ( https://coveralls.io/github/kivy/python-for-android?branch=master )
56[ ![ Backers on Open Collective] ( https://opencollective.com/kivy/backers/badge.svg )] ( #backers )
67[ ![ Sponsors on Open Collective] ( https://opencollective.com/kivy/sponsors/badge.svg )] ( #sponsors )
78
Original file line number Diff line number Diff line change 77 mock
88 pytest
99 virtualenv
10+ py3: coveralls
1011# makes it possible to override pytest args, e.g.
1112# tox -- tests/test_graph.py
1213commands = pytest {posargs:tests/}
14+ passenv = TRAVIS TRAVIS_*
1315setenv =
1416 PYTHONPATH ={toxinidir}
1517
18+ [testenv:py3]
19+ # for py3 env we will get code coverage
20+ commands =
21+ coverage run --branch --source =pythonforandroid -m pytest {posargs:tests/}
22+ coverage report -m
23+
1624[testenv:pep8]
1725deps = flake8
1826commands = flake8 pythonforandroid/ tests/ ci/
You can’t perform that action at this time.
0 commit comments