r-ci

Configures GitHub Actions CI workflows for R projects including R CMD check, renv caching, and coverage reporting.

Updated Jul 29, 2026
One-click install
npx skills add https://github.com/chris-prener/dev-kit --skill r-ci-chris-prener
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: r-ci
Source: https://github.com/chris-prener/dev-kit/tree/main/dev-kit/skills/r-ci
Command: npx skills add https://github.com/chris-prener/dev-kit --skill r-ci-chris-prener

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Setting up continuous integration for R projects requires assembling the right GitHub Actions workflow, caching renv dependencies correctly, and wiring in coverage reporting — a repetitive, error-prone process that this Skill standardizes. ## Core Features & Use Cases - Workflow Templates: Provides ready-to-adapt GitHub Actions templates for R CMD check (packages), test+lint (non-package projects), and targets pipeline runs. - renv Caching Strategy: Defines cache key and restore-key patterns keyed on the renv.lock hash to keep CI runs fast. - Coverage & Multi-OS Testing: Adds covr-based Codecov reporting and matrix builds across Ubuntu, Windows, and macOS. - Use Case: You just created a new R package and need CI before your first pull request. Use this Skill to generate an R CMD check workflow that runs on three operating systems, caches dependencies, and fails on warnings. ## Quick Start Ask Claude to set up GitHub Actions CI for your R package with R CMD check, renv caching, and coverage reporting.

Frequently Asked Questions about r-ci

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up GitHub Actions CI for an R package?▼

Use the R CMD check workflow template with r-lib/actions: setup-r installs R, setup-r-dependencies installs and caches package dependencies, and check-r-package runs the check. A matrix strategy runs the check across Ubuntu, Windows, and macOS.

How do I cache renv dependencies in GitHub Actions?▼

Cache the RENV_PATHS_ROOT directory with actions/cache using a key combining the OS and the renv.lock file hash, with an OS-prefixed restore key for partial matches. The cache invalidates automatically whenever renv.lock changes.

Does R CMD check CI work for non-package R projects?▼

No, R CMD check only applies to packages. For plain R projects, use the test-and-lint workflow that restores renv, runs lintr on the R/ directory, and executes testthat tests directly.

How do I add code coverage reporting to an R CI workflow?▼

Add a coverage job that installs covr via setup-r-dependencies and runs covr::codecov() to upload results to Codecov. Coverage is typically advisory and does not block merges.

Why does my R CI build fail with missing system libraries?▼

Some R packages need system libraries like libcurl, openssl, or libxml2 that are not preinstalled on runners. Add an apt-get install step for Ubuntu, or use r-lib/actions/setup-r-dependencies which auto-detects system requirements.

When should I not use this R CI skill?▼

Do not use it for local-only testing (use r-testing), package structure questions (r-package-structure), dependency problems (r-dependencies), or CI for non-R projects. It covers GitHub Actions CI configuration only.