39 Actions: Testing Workflows
39.1 Setting up GitHub Actions workflows to check tests and test coverage
Add the
covr
package 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.yaml")
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_TOKEN
Add the codecov.io badge markdown syntax to your
README.Rmd
and knit to render theREADME.md
file.Push your local changes to GitHub and sit back and watch the magic happen β¨
39.2 Setting up GitHub Actions workflows with R
The dev version of usethis
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
covr
package 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.yaml")
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_TOKEN
Add the codecov.io badge markdown syntax to your
README.Rmd
and knit to render theREADME.md
file.Push your local changes to GitHub and sit back and watch the magic happen β¨