diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0c553eab4..aa9083bbb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -50,13 +50,28 @@ jobs: with: coverageFile: coverage.xml token: ${{ secrets.GITHUB_TOKEN }} - + - if: matrix.python-version == '3.12' + run: | + pip install genbadge[coverage] + genbadge coverage --input-file coverage.xml --output-file ./dist/coverage/coverage-badge.svg + coverage html -d dist/coverage + - if: matrix.python-version == '3.12' + uses: actions/upload-artifact@v4 + with: + name: coverage + retention-days: 1 + path: dist deploy: + needs: [test] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - uses: actions/download-artifact@v4 + with: + name: coverage + path: dist - uses: actions/setup-python@v5 with: python-version: "3.12" diff --git a/.gitignore b/.gitignore index 0d5d9ce5b..fde0f363f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,14 +1,17 @@ __pycache__/ +.coverage .env +.ipynb_checkpoints .vscode/launch.json +*.DS_Store *.egg-info/ build/ +coverage.xml dist/ docs/ -user_docs/ +output/ tests/cache tests/generated_json_schemas tmp/ -output/ -*.DS_Store -.ipynb_checkpoints +user_docs/ + diff --git a/README.md b/README.md index 58cdce47b..fbc16d130 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,7 @@ [![downloads](https://static.pepy.tech/badge/bioimageio.spec)](https://pepy.tech/project/bioimageio.spec) [![conda-forge downloads](https://img.shields.io/conda/dn/conda-forge/bioimageio.spec.svg?label=conda-forge)](https://anaconda.org/conda-forge/bioimageio.spec/) ![code style](https://img.shields.io/badge/code%20style-black-000000.svg) +[![coverage](https://bioimage-io.github.io/spec-bioimage-io/coverage/coverage-badge.svg)](https://bioimage-io.github.io/spec-bioimage-io/coverage/index.html) # Specifications for bioimage.io