We have the coverage-badge package available, which generates an SVG from the most recent coverage run, with a simple command:
coverage-badge -f -o tests/coverage.svg
How to run this automatically at some point when new code is introduced?
See #9 and #10 for more history.