Sets up a GitHub Actions workflow that calculates and reports test coverage:
uses
covr::package_coverage().on a pull request:
calculates test coverage for head.
builds a badge (for use in the commit message).
initialises or switches to the
covr2gh-storagebranch.switches to base branch and calculates test coverage.
compares coverage for head and base and posts a comment with the main findings.
uploads base coverage and badge as artefacts.
posts a workflow summary.
on a push to main:
calculates test coverage for head and creates a badge.
switches to or creates the
covr2gh-storagebranch.commits badge (referenced in the README).
Details
use_covr2gh_action() wraps usethis::use_github_action().