From dcdbffebd904e5843b3005b8e8a0a4de4beac667 Mon Sep 17 00:00:00 2001 From: fynnbe Date: Tue, 29 Oct 2024 13:20:37 +0100 Subject: [PATCH] add badge --- .github/workflows/build.yaml | 7 ++++--- README.md | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index c86aafec..0945af6d 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -90,12 +90,13 @@ jobs: with: coverageFile: coverage.xml token: ${{ secrets.GITHUB_TOKEN }} - - if: matrix.python-version == '3.12' && github.event_name != 'pull_request' + - if: matrix.python-version == '3.12' && github.ref == 'refs/heads/main' run: | pip install genbadge[coverage] - genbadge coverage --input-file coverage.xml --output-file ./dist/coverage-badge.svg + genbadge coverage --input-file coverage.xml --output-file ./dist/coverage/coverage-badge.svg coverage html -d dist/coverage - - uses: actions/upload-artifact@v4 + - if: matrix.python-version == '3.12' && github.ref == 'refs/heads/main' + uses: actions/upload-artifact@v4 with: name: coverage retention-days: 1 diff --git a/README.md b/README.md index 59743839..333b5fab 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,7 @@ [![downloads](https://static.pepy.tech/badge/bioimageio.core)](https://pepy.tech/project/bioimageio.core) [![conda-forge downloads](https://img.shields.io/conda/dn/conda-forge/bioimageio.core.svg?label=conda-forge)](https://anaconda.org/conda-forge/bioimageio.core/) ![code style](https://img.shields.io/badge/code%20style-black-000000.svg) +[![coverage](https://bioimage-io.github.io/core-bioimage-io-python/coverage/coverage-badge.svg)](https://bioimage-io.github.io/core-bioimage-io-python/coverage/index.html) # core-bioimage-io-python