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:
9
9
10
10
before_install :
11
11
- 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
13
14
# (venv/virtualenv are both used by tests/test_pythonpackage.py)
14
15
- sudo pip install tox>=2.0
16
+ - sudo pip3 install coveralls
15
17
# https://github.com/travis-ci/travis-ci/issues/6069#issuecomment-266546552
16
18
- git remote set-branches --add origin master
17
19
- git fetch
@@ -39,6 +41,8 @@ script:
39
41
# case that the travis log doesn't produce any output for more than 10 minutes
40
42
- while sleep 540; do echo "==== Still running (travis, don't kill me) ===="; done &
41
43
- 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"
43
45
# kill the background process started before run docker
44
46
- kill %1
47
+ after_success :
48
+ - coveralls
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ python-for-android
2
2
==================
3
3
4
4
[ ![ 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 )
5
6
[ ![ Backers on Open Collective] ( https://opencollective.com/kivy/backers/badge.svg )] ( #backers )
6
7
[ ![ Sponsors on Open Collective] ( https://opencollective.com/kivy/sponsors/badge.svg )] ( #sponsors )
7
8
Original file line number Diff line number Diff line change 7
7
mock
8
8
pytest
9
9
virtualenv
10
+ py3: coveralls
10
11
# makes it possible to override pytest args, e.g.
11
12
# tox -- tests/test_graph.py
12
13
commands = pytest {posargs:tests/}
14
+ passenv = TRAVIS TRAVIS_*
13
15
setenv =
14
16
PYTHONPATH ={toxinidir}
15
17
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
+
16
24
[testenv:pep8]
17
25
deps = flake8
18
26
commands = flake8 pythonforandroid/ tests/ ci/
You can’t perform that action at this time.
0 commit comments