Skip to content

Commit

Permalink
Add CI
Browse files Browse the repository at this point in the history
  • Loading branch information
adamhsparks committed Nov 2, 2024
1 parent d9c583e commit 18de0b4
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .woodpecker/R-CMD-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Runs R CMD check for an R package while installing dependencies with pak.
# https://github.com/r-lib/pak is used to install package dependencies.
# The first command installs pak following the install instruction of package itself.
#
# When setting Ncpus (default=1) to a higher value, pak will download and install package in parallel.
# pak automatically uses binary packages from the public Posit Package Manager.
#
# This example uses the rocker/r-base image to run the R CMD check. Any other image with R installed can be used.
# Alternatively, the rcmdcheck package can be installed and use in replacement to `R CMD check``.

steps:
'Check package':
when:
event: [push, pull_request]
image: rocker/r-base
secrets: [github_pat]
commands:
- R -q -s -e 'install.packages("pak", repos = sprintf("https://r-lib.github.io/p/pak/stable/%s/%s/%s", .Platform$pkgType, R.Version()$os, R.Version()$arch))'
- R -q -e 'options(Ncpus = 4)'
- R -q -e 'pak::pak()'
- R CMD check --as-cran .

0 comments on commit 18de0b4

Please sign in to comment.