diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 24e2b8a..28ab1a1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -74,6 +74,7 @@ jobs: coverage run -m pytest --junitxml=./reports/test-results-${{ env.PYTHON_VERSION }}.xml coverage html -d ./reports/htmlcov coverage xml -o ./reports/coverage.xml + genbadge coverage -i ./reports/coverage.xml -o ./reports/htmlcov/coverage-badge.svg coverage report -m - name: Add coverage reports @@ -83,17 +84,6 @@ jobs: pytest-xml-coverage-path: ./reports/coverage.xml junitxml-path: ./reports/test-results-${{ env.PYTHON_VERSION }}.xml - - name: Create coverage badge - if: ${{ github.event_name == 'push' && github.ref_name == 'main' }} - uses: schneegans/dynamic-badges-action@v1.6.0 - with: - auth: ${{ secrets.GIST_SECRET }} - gistID: 019787fcdec96f05d6c53367bbf2b949 - filename: ensembl-utils_badge.json - label: Coverage - message: ${{ steps.coverage_report.outputs.coverage }} - color: ${{ steps.coverage_report.outputs.color }} - - name: Deploy documentation to GitHub Pages if: ${{ github.event_name == 'push' && github.ref_name == 'main' }} run: | diff --git a/README.md b/README.md index 54424cd..9e9d6e9 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Ensembl Python general-purpose utils [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://github.com/Ensembl/ensembl-utils/blob/main/LICENSE) -[![Coverage](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/JAlvarezJarreta/019787fcdec96f05d6c53367bbf2b949/raw/ensembl-utils_badge.json)](https://ensembl.github.io/ensembl-utils/coverage) +[![Coverage](https://ensembl.github.io/ensembl-utils/coverage/coverage-badge.svg)](https://ensembl.github.io/ensembl-utils/coverage) [![CI](https://github.com/Ensembl/ensembl-utils/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/Ensembl/ensembl-utils/actions/workflows/ci.yml) Centralise generic Python utils used by other project within Ensembl design to facilitate frequent tasks such as input file path checks, archive files IO manipulation or logging setup, among others. diff --git a/pyproject.toml b/pyproject.toml index 53ac2b1..d13099a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -49,6 +49,7 @@ dependencies = [ cicd = [ "black", "coverage", + "genbadge[coverage]", "mypy", "pylint", "pytest",