diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 0d4c105..d8033cf 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -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 diff --git a/README.md b/README.md index 0fe0a11..078c8c1 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/test/run_test.sh b/test/run_test.sh index 03bde02..43743f4 100755 --- a/test/run_test.sh +++ b/test/run_test.sh @@ -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 @@ -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