From b906a35bf95b1bc0717e4bb8a52942cf8c709373 Mon Sep 17 00:00:00 2001 From: Alexander Bonkowski Date: Fri, 26 Jan 2024 15:26:30 +0100 Subject: [PATCH 1/2] Fix coverage not working Fixes #30 --- .github/workflows/test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3a0a3e9..efae58f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -42,8 +42,9 @@ jobs: sudo apt update && sudo apt install -y libegl1-mesa-dev - name: pytest run: | - pytest tests + pytest --cov=agility --cov-report=xml tests - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v3 + if: matrix.python-version == '3.11' && matrix.os == 'ubuntu-latest' env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} From 7645cf3c7a7e175ea64633cb3b4f8d59c43de8ac Mon Sep 17 00:00:00 2001 From: Alexander Bonkowski Date: Fri, 26 Jan 2024 15:32:23 +0100 Subject: [PATCH 2/2] Add coverage badge --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 9092aeb..64f443f 100755 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ [![Documentation Status](https://readthedocs.org/projects/agility1/badge/?version=latest)](https://agility1.readthedocs.io/en/latest/?badge=latest) [![Coverage Status](https://coveralls.io/repos/github/ab5424/agility/badge.svg?branch=main)](https://coveralls.io/github/ab5424/agility?branch=main) +[![code coverage](https://img.shields.io/codecov/c/gh/ab5424/agility)](https://codecov.io/gh/ab5424/agility) [![pre-commit.ci status](https://results.pre-commit.ci/badge/github/ab5424/agility/main.svg)](https://results.pre-commit.ci/latest/github/ab5424/agility/main) [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/ab5424/agility/HEAD)