rgithubpackagereadme

How to add R-CMD-check state on README at Github


I know how to do R-CMD-check in R Studio and it passed all.

However, I wish to add this R-CMD-check "passing" state in README file for the package on Github

Just looks like what the picture shown below.

I saw others' this part is just a link and when click it, this just turns to this picture.

I wish to know how can I do R-CMD-check on Github and so that I can add the "passing" state in README

enter image description here


Solution

  • If you want to get this badge automatically, open the R project with your package and run:

    usethis::use_github_action_check_standard()
    

    in the R console (or RStudio). This will add a .github/workflows/ folder with some YAML content to your package. See documentation.

    When you commit and push to GitHub, the check should run automatically. If you want to insert a badge, go to "Actions" menu in the GitHub web interface, open the check results and you'll see the source code of the badge (which is in SVG format) to be inserted into your README.md file. It should be updated after each push.

    For full and really simple manual with screenshots go to https://ropenscilabs.github.io/actions_sandbox/packageci.html#actions-for-continuous-integration-checks.