diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 61a6c24..ec60cbb 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -27,7 +27,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - python -m pip install flake8 pytest pytest-cov + python -m pip install flake8 pytest coverage coveralls python -m pip install -e . if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - name: Lint with flake8 @@ -38,4 +38,22 @@ jobs: flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - name: Test with pytest run: | - pytest --cov src -s + coverage run ./tests/test_dvg_ringbuffer.py -vv + - name: Upload coverage data to coveralls.io + run: coveralls --service=github + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + COVERALLS_FLAG_NAME: ${{ matrix.test-name }} + COVERALLS_PARALLEL: true + coveralls: + name: Indicate completion to coveralls.io + needs: build + runs-on: ubuntu-latest + container: python:3-slim + steps: + - name: Finished + run: | + pip3 install --upgrade coveralls + coveralls --service=github --finish + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/README.rst b/README.rst index 7b4649d..2e77b86 100644 --- a/README.rst +++ b/README.rst @@ -6,6 +6,8 @@ :target: https://pypi.org/project/dvg-ringbuffer .. image:: https://github.com/Dennis-van-Gils/python-dvg-ringbuffer/actions/workflows/python-package.yml/badge.svg :target: https://github.com/Dennis-van-Gils/python-dvg-ringbuffer/actions/workflows/python-package.yml +.. image:: https://coveralls.io/repos/github/Dennis-van-Gils/python-dvg-ringbuffer/badge.svg + :target: https://coveralls.io/github/Dennis-van-Gils/python-dvg-ringbuffer .. image:: https://img.shields.io/badge/code%20style-black-000000.svg :target: https://github.com/psf/black .. image:: https://img.shields.io/badge/License-MIT-purple.svg