R-hub v2, i.e. version 2 or later of the rhub package, is a completely new check system. In this article we highlight the differences between the old and the new system.
There are two ways to use R-hub v2. The recommended way is to store
your R package in a GitHub repository and use the rhub_*()
functions to start checks on GitHub Actions, using your own GitHub
account.
Alternatively, if you don’t want to store your R package at GitHub,
you can use the rc_*()
functions to run checks in a shared
GitHub organization at https://github.com/r-hub2, using the R Consortium
runners. See more about the R Consortium runners below.
origin
git remote
is set to the GitHub repository.gitcreds::gitcreds_set()
to add
the token to the git credential store.Call rhub_setup()
from the local git clone to set up
R-hub v2 for your package. This adds a GitHub Actions workflow to your
local repository. Push this change to GitHub, into your default git
branch and then you are ready to call start checks with
rhub_check()
.
branch
argument of rhub_check()
.GitHub Actions is free for public repositories. For private repositories you also get some minutes for free, depending on the GitHub subscription you have. See About billing for GitHub Actions for details.
If you don’t want to put your package on GitHub, you can still use the rhub package to run package checks on any supported platform using a shared pool of runners in the https://github.com/r-hub2 GitHub organization.
The process is similar to the first version of R-hub:
Set your working directory to the R package you want to check.
Obtain a token from R-hub, to verify your email address:
rc_new_token()
(You do not need to do this, if you already submitted packages to a
previous version of R-hub from the same machine, using the same email
address. Call rc_list_local_tokens()
to check if you
already have tokens.)
Submit a build with
rc_submit()
Select the platforms you want to use, and follow the instructions and the link provided to see your check results.
rhub_setup()
and
rhub_check()
functions instead.rc_submit()
.To avoid these limitations (except for the need for a GitHub
account), put your package in a GitHub repository, and use the
rhub_setup()
and rhub_check()
functions
instead of rc_submit()
and the R Consortium runners.