use_github_action("check-release")GitHub Actions
In this lab, we will learn how to turn on continuous integration checking.
Goal: by the end of this lab, you should be able to automate checking for your GitHub package.
Continuous integration
Checking your software for errors on a variety of different platforms can help you make it more robust. To make this process automatic, we can use a cloud-based, continuous integration service like GitHub Actions.
GitHub Actions will run R CMD check on your package on a virtual machine instance running a plain version of Ubuntu. A new check will be triggered automatically every time you push a new commit to your GitHub repository.
To enable GitHub Actions checking, use the use_github_action() function from the usethis package.
This will provide a template of the .github/workflows/R-CMD-check.yaml file that will control the behavior of GitHub Actions.
- Create a
R-CMD-check.yamlfile by runningusethis::use_github_action("check-release").
Also, you can add a GitHub Actions badge to your README (that will be automatically updated). See the output in the Console for details
- Add the markdown code for the GitHub Actions badge to your
README.Rmdfile.
Since checking is triggered via GitHub, you have to push these files to the GitHub repository.
- Commit the
.github/workflows/R-CMD-check.yamlfile and the changes to theREADMEfiles to GitHub.
Reflection
Please respond to the following prompt on Slack in the #questions channel.
Prompt: What questions do you still have about R packages? What would you like to discuss next week?