Skip to content

Commit

Permalink
GitHub Actions: Output a coverage report
Browse files Browse the repository at this point in the history
Note: we currently only have coverage for Selenium tests.
  • Loading branch information
mwiencek committed Dec 19, 2024
1 parent 76b22c3 commit 4e7e869
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,8 @@ jobs:
report_paths: 'junit_output/*.xml'
fail_on_failure: true
require_tests: true

- uses: irongut/[email protected]
with:
filename: cobertura-coverage.xml
format: markdown
2 changes: 2 additions & 0 deletions docker/musicbrainz-tests/run_selenium_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ sudo -E -H -u musicbrainz carton exec -- \
sv down template-renderer
sleep 10
sudo -E -H -u musicbrainz ./node_modules/.bin/nyc report --reporter=html
sudo -E -H -u musicbrainz ./node_modules/.bin/nyc report --reporter=cobertura

if [ "$GITHUB_ACTIONS" = 'true' ]; then
if [ -d junit_output ]; then
Expand All @@ -72,4 +73,5 @@ if [ "$GITHUB_ACTIONS" = 'true' ]; then
done
cp -a t/selenium/.sir-*.log "$artifacts"
cp -Ra coverage "$artifacts"
cp -a coverage/cobertura-coverage.xml "$GITHUB_WORKSPACE"
fi

0 comments on commit 4e7e869

Please sign in to comment.