Continuous Integration

Setting up CI/CD

When initializing pre-commit in your repo with precommit::use_precommit(), you can specify the Continuous integration provider with ci = "native" if you want to use pre-commit.ci or ci = "gha" if you want to use GitHub Actions. For existing repos, see below.

Comparison

Next, we quickly introduce the two options. We recommend pre-commit.ci unless your package has system dependencies that are not shipped with the R package on Linux and at the same time you want to use the roxygenize hook.

pre-commit.ci

Pros:

Cons:

GitHub Actions

Pros:

Cons:

Migrating existent repos

We provide helper functionality to set up CI/CD. Use precommit::use_ci("gha") for GitHub Actions or precommit::use_ci("native") for pre-commit.ci respectively.