diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 2b62a87..74d3aca 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -30,4 +30,23 @@ jobs: # find and run all unit tests - name: Run unit tests - run: coverage run -m unittest discover test \ No newline at end of file + run: | + coverage run --source=svgpathtools -m unittest discover test + coverage html # generate static website detailing coverage + echo "coverage: $(coverage report | grep TOTAL | awk '{ print $4 }')" > htmlcov/percentage.yml # get overall percentage + + - name: Deploy to Heroku + uses: akhileshns/heroku-deploy@v3.12.12 + with: + heroku_api_key: ${{secrets.HEROKU_API_KEY}} + heroku_app_name: svgpathtools-coverage + heroku_email: ${{secrets.HEROKU_EMAIL}} +# +# # send report to Codacy +# - name: Report to Codacy +# run: | +# export CODACY_API_TOKEN=${{ secrets.CODACY_API_TOKEN }} +# export CODACY_ORGANIZATION_PROVIDER=gh +# export CODACY_USERNAME=mathandy +# export CODACY_PROJECT_NAME=svgpathtools +# bash <(curl -Ls https://coverage.codacy.com/get.sh) report -r \ No newline at end of file diff --git a/README.md b/README.md index 18e12d9..0c8a7df 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,7 @@ [![PyPI](https://img.shields.io/pypi/v/svgpathtools)](https://pypi.org/project/svgpathtools/) ![Build](https://img.shields.io/github/workflow/status/mathandy/svgpathtools/Github%20CI%20Unit%20Testing) [![PyPI - Downloads](https://img.shields.io/pypi/dm/svgpathtools?color=yellow)](https://pypistats.org/packages/svgpathtools) +[![Code Coverage](https://img.shields.io/badge/dynamic/yaml?color=9cf&label=coverage&query=%24.DATA.SUBDATA&url=https%3A%2F%2Fsvgpathtools-coverage.herokuapp.com%2Fcoverage.yml)](https://svgpathtools-coverage.herokuapp.com) # svgpathtools