We’ve reimagined the R universe CI workflows so you can run the exact same workflow from your own GitHub repository. This allows you to test or debug the build and check process on your R package, exactly as it will be done in the R universe, but without actually deploying https://r-universe.dev.
The instructions on r-universe-org/workflows explain how it works: simply create a file /.github/workflows/r-universe-test.yml in your R package git repo with the following configuration:
name: Test R-universe
on:
push:
pull_request:
jobs:
build:
name: R-universe testing
uses: r-universe-org/workflows/.github/workflows/build.yml@v3
with:
universe: ${{ github.repository_owner }}
That’s it. The workflow will use the fully automated R universe installation to build and check the package against a range of R versions on Linux, Windows and MacOS configurations very similar to CRAN.
It is possible to use this workflow in your R package for push and/or pull requests in addition to those from r-lib/actions. Both will check your R package, but keep in mind that the goal is very different: workflows out r-lib/actions are highly configurable and can test R packages using numerous options and environments. The R universe workflow, on the other hand, like CRAN, is not customizable at all: it uses the exact settings and processes as it happens in the R universe, and nothing else.
The ability to test the build workflow is a recurring feature request, and I hope this will indeed help package maintainers with debugging issues. I also hope that the refactoring will make it a little easier to understand the R universe building process, and allow the community to hack the workflows and actions to contribute improvements.
Related
#Test #universe #build #workflow #GitHub #repository #bloggers


