Skip to content

Commit

Permalink
Add a coverage badge to README
Browse files Browse the repository at this point in the history
  • Loading branch information
vjf committed Sep 5, 2024
1 parent 6bde1c3 commit f399406
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,10 @@ jobs:
run: |
cd test
./run_test.sh
- name: Deploy test badge to gh-pages
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: tests/badge
branch: gh-pages


1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[![pdm-managed](https://img.shields.io/badge/pdm-managed-blueviolet)](https://pdm.fming.dev)
![Test Status](https://github.com/AuScope/geomodel-2-3dweb/actions/workflows/tests.yml/badge.svg)
[![Coverage Status](https://github.com/AuScope/metarecogen/blob/gh-pages/coverage-badge.svg)]()

# geomodel-2-3dweb

Expand Down
5 changes: 4 additions & 1 deletion test/run_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$REPO_DIR/assimp-$ASSIMP_VER/bin
echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH"

# Install coverage
python3 -m pip install coverage
python3 -m pip install coverage defusedxml genbadge

# Test GOCAD import & conversion
pushd unit/gocad_import > /dev/null
Expand Down Expand Up @@ -54,6 +54,9 @@ coverage run db_tables.py
popd > /dev/null

coverage combine unit/gocad_import/.coverage ../scripts/lib/db/.coverage ../scripts/.coverage unit/assimp_kit/.coverage unit/webapi/.coverage
coverage html
coverage xml
coverage report --omit '*/geomodel-2-3dweb/scripts/lib/exports/print_assimp.py'
genbadge coverage -i coverage.xml -o badge/coverage-badge.svg -v

deactivate

0 comments on commit f399406

Please sign in to comment.