Skip to content

Commit

Permalink
Setup coverage testing, closes kivy#1058
Browse files Browse the repository at this point in the history
Also enables report to coveralls.io via GitHub Action.
Note the `COVERALLS_REPO_TOKEN` was setup via:
https://github.com/kivy/buildozer/settings/secrets
And is accessible for repos admin via:
https://coveralls.io/github/kivy/buildozer
  • Loading branch information
AndreMiras committed Apr 10, 2020
1 parent 916dc6b commit 818d76a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/test_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,15 @@ jobs:

- name: Requirements
run: |
pip install --timeout=120 -U setuptools tox>=2.0
pip install -U coveralls setuptools tox>=2.0
tox
- name: Build
run: |
docker build --tag=buildozer .
- name: Test
run: |
docker run buildozer --version
- name: coveralls
run: coveralls
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ Buildozer
=========

[![Build](https://github.com/kivy/buildozer/workflows/Continuous%20Integration/badge.svg)](https://github.com/kivy/buildozer/actions?query=workflow%3A%22Continuous+Integration%22)
[![Coverage Status](https://coveralls.io/repos/github/kivy/buildozer/badge.svg)](https://coveralls.io/github/kivy/buildozer)
[![Backers on Open Collective](https://opencollective.com/kivy/backers/badge.svg)](#backers)
[![Sponsors on Open Collective](https://opencollective.com/kivy/sponsors/badge.svg)](#sponsors)

Expand Down
7 changes: 7 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,15 @@ envlist = pep8,py27,py3
deps =
mock
pytest
py3: coveralls
commands = pytest tests/

[testenv:py3]
# for py3 env we will get code coverage
commands =
coverage run --branch --source=buildozer -m pytest {posargs:tests/}
coverage report -m

[testenv:pep8]
deps = flake8
commands = flake8 buildozer/
Expand Down

0 comments on commit 818d76a

Please sign in to comment.