42 Actions: Testing Workflows
42.1 Setting up GitHub Actions workflows to check tests and test coverage in R
The usethis package has functions that will let you set-up your CI using GitHub Actions with ease! Hereβs a quickstart guide below, and more details can be found in the Github actions with R book.
Add the
covrpackage as a suggested dependendency to your package via:usethis::use_package("covr", type = "Suggests")Add a GitHub Actions workflows that runs a comprehensive build check across the major operating systems and runs the test suite and calculates coverage via:
usethis::use_github_action("check-standard")andusethis::use_github_action("test-coverage")Link your R package GitHub repo with codecov.io
Copy the codecov.io token for that repo from codecov.io and add that as a GitHub Secret named
CODECOV_TOKENAdd the codecov.io badge markdown syntax to your
README.Rmdand knit to render theREADME.mdfile.Push your local changes to GitHub and sit back and watch the magic happen β¨
