Skip to content

Commit

Permalink
add status badge
Browse files Browse the repository at this point in the history
  • Loading branch information
vreuter committed May 3, 2024
1 parent c1fc975 commit 9ab8e02
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
15 changes: 15 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
workflow_dispatch:

jobs:
# See: https://hynek.me/articles/ditch-codecov-python/
test-with-coverage:
strategy:
fail-fast: false
Expand All @@ -32,6 +33,7 @@ jobs:
path: .coverage.*
if-no-files-found: ignore

# See: https://hynek.me/articles/ditch-codecov-python/
report-coverage:
name: Combine and check coverage
needs: test-with-coverage
Expand Down Expand Up @@ -65,6 +67,19 @@ jobs:
path: htmlcov
if: ${{ failure() }}

# See: https://nedbatchelder.com/blog/202209/making_a_coverage_badge.html
- name: Create coverage status badge
uses: schneegans/[email protected]
with:
auth: ${{ secrets.GIST_BADGE_SECRET }}
gistID: 5d09224ecea8b55443fb2c92b8e8c6a7
filename: badge.json
label: Coverage
message: ${{ env.total }}%
minColorRange: 50
maxColorRange: 90
valColorRange: ${{ env.total }}

other-tests:
strategy:
fail-fast: false
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# nuclei-vis-napari
[![CI - Test](https://github.com/gerlichlab/nuclei-vis-napari/actions/workflows/tests.yaml/badge.svg)](https://github.com/gerlichlab/nuclei-vis-napari/actions/workflows/tests.yaml)
[![Coverage](https://codecov.io/github/gerlichlab/nuclei-vis-napari/coverage.svg)](https://codecov.io/gh/gerlichlab/nuclei-vis-napari)
![Coverage](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/vreuter/5d09224ecea8b55443fb2c92b8e8c6a7/raw/badge.json)
[![Formatting](https://github.com/gerlichlab/nuclei-vis-napari/actions/workflows/format.yaml/badge.svg)](https://github.com/gerlichlab/nuclei-vis-napari/actions/workflows/format.yaml)
[![Linting](https://github.com/gerlichlab/nuclei-vis-napari/actions/workflows/lint.yaml/badge.svg)](https://github.com/gerlichlab/nuclei-vis-napari/actions/workflows/lint.yaml)

Expand Down

0 comments on commit 9ab8e02

Please sign in to comment.