diff --git a/.github/workflows/test_python.yml b/.github/workflows/test_python.yml index ab73126a9..38312c4da 100644 --- a/.github/workflows/test_python.yml +++ b/.github/workflows/test_python.yml @@ -25,7 +25,7 @@ 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: | @@ -33,3 +33,7 @@ jobs: - name: Test run: | docker run buildozer --version + - name: coveralls + run: coveralls + env: + COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} diff --git a/README.md b/README.md index 7c7f52721..2b3e21f6d 100644 --- a/README.md +++ b/README.md @@ -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) diff --git a/tox.ini b/tox.ini index 952edccd6..ca07806d4 100644 --- a/tox.ini +++ b/tox.ini @@ -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/