Skip to content

Add GitHub Actions CI workflow for R CMD check - #30

Merged
seonghobae merged 7 commits into
developfrom
copilot/add-github-actions-ci
Jan 9, 2026
Merged

Add GitHub Actions CI workflow for R CMD check#30
seonghobae merged 7 commits into
developfrom
copilot/add-github-actions-ci

Conversation

Copilot AI commented Jan 8, 2026

Copy link
Copy Markdown
Contributor

Adds GitHub Actions workflow to replace Travis CI and AppVeyor, running R CMD check across multiple platforms and R versions on PRs and pushes to main, master, and develop.

Changes

  • .github/workflows/R-CMD-check.yaml: CI workflow using r-lib/actions v2

    • Matrix: Ubuntu (devel, release, oldrel-1), macOS (release), Windows (release)
    • Automatic dependency caching via RSPM
    • Uploads check artifacts on failure
  • README: Added GitHub Actions badge showing unified CI status across all platforms

Details

The workflow uses r-lib/actions/check-r-package@v2 for full R CMD check (build, install, tests, examples, documentation). This is the standard approach in the R ecosystem and more comprehensive than running tests alone.

Travis CI and AppVeyor badges retained for now but can be removed once this workflow is validated.

Original prompt

This section details on the original issue you should resolve

<issue_title>Add GitHub Actions CI for tests</issue_title>
<issue_description>## Background
We currently rely on Travis CI and AppVeyor badges, but we do not run tests on GitHub Actions. Adding a GHA workflow would standardize CI for PRs and keep checks close to the repo.

Proposal

Create a GitHub Actions workflow to run the package tests (or full R CMD check) on PRs and pushes to develop. Use r-lib/actions to set up R, install dependencies, and cache packages.

Suggested defaults:

  • OS matrix: ubuntu-latest, macos-latest, windows-latest
  • R versions: release (optionally add devel and oldrel)
  • Run: r-lib/actions/check-r-package, or testthat::test_check() if we prefer a lighter workflow
  • Cache: r-lib/actions cache enabled
  • Artifacts: upload check results on failure

Acceptance Criteria

  • A workflow runs on PRs and pushes to develop.
  • The workflow installs dependencies and runs tests or R CMD check.
  • CI results appear in PR checks.
  • Failures surface logs/artifacts for debugging.

Open Questions

  • Do we want to keep Travis/AppVeyor alongside GHA, or replace them?
  • Which R versions and OSes should be included?
  • Should we run full R CMD check or only testthat::test_check()?
    </issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: seonghobae <8172694+seonghobae@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Jan 8, 2026

Copy link
Copy Markdown
Contributor

Warning

Rate limit exceeded

@seonghobae has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 7 minutes and 39 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between e88aa8f and 6440fba.

📒 Files selected for processing (3)
  • .github/workflows/R-CMD-check.yaml
  • README.Rmd
  • README.md
📝 Walkthrough

Walkthrough

GitHub Actions 워크플로우를 추가하여 여러 OS(macOS, Windows, Ubuntu)와 R 버전(devel, release, oldrel-1)에서 자동으로 R 패키지 검사를 수행하도록 구성했습니다. README 파일에 CI 배지 정보를 추가하여 지속적 통합 상태를 표시합니다.

Changes

Cohort / File(s) 변경 사항
GitHub Actions 워크플로우
\\.github/workflows/R-CMD-check.yaml
main, master, develop 브랜치의 push와 pull request에서 트리거되는 새로운 워크플로우 추가. 3개 OS × 3개 R 버전 조합에서 의존성 설치 및 R CMD check 실행 (수동 비활성화, vignette 최적화 설정)
문서 업데이트
README.Rmd, README.md
새로운 "Continuous Integration (Ubuntu, macOS, Windows)" 섹션 추가. R-CMD-check 배지 포함

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 깃허브 액션이 쏟아져 내려,
우분투, 맥, 윈도우에서 춤을 춘다네!
패키지 검사는 자동으로, 빠르게 빠르게,
CI 배지가 반짝반짝 — 우리의 품질 증명!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The PR addresses all core requirements from #29: implements GitHub Actions workflow with r-lib/actions, configures OS matrix (ubuntu/macos/windows) and R versions (release/devel/oldrel-1), runs on PRs and develop/main/master branches, enables caching, and uploads artifacts on failure.
Out of Scope Changes check ✅ Passed All changes are directly scoped to #29 requirements: workflow implementation, README badge documentation, and related file modifications with no unrelated additions.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title clearly summarizes the main change: adding a GitHub Actions CI workflow for R CMD check, which matches the primary focus of the changeset.
Description check ✅ Passed The description is well-related to the changeset, providing clear details about the GitHub Actions workflow implementation, matrix configurations, and README updates.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch copilot/add-github-actions-ci

Comment @coderabbitai help to get the list of available commands and usage tips.

Copilot AI and others added 2 commits January 8, 2026 22:26
Co-authored-by: seonghobae <8172694+seonghobae@users.noreply.github.com>
Co-authored-by: seonghobae <8172694+seonghobae@users.noreply.github.com>
Copilot AI changed the title [WIP] Add GitHub Actions CI for running tests Add GitHub Actions CI workflow for R CMD check Jan 8, 2026
Copilot AI requested a review from seonghobae January 8, 2026 22:30

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In @README.md:
- Around line 141-144: The CI badge in README.md is correct; markdownlint is
flagging the heading "Continuous Integration (Ubuntu, macOS, Windows)" for
setext vs ATX style—if you want to satisfy the linter, update the source
README.Rmd to emit a setext-style heading for that section (adjust the
corresponding heading in README.Rmd rather than editing the generated
README.md), then re-render to regenerate README.md; otherwise ignore this minor
formatting warning.
📜 Review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Cache: Disabled due to Reviews > Disable Cache setting

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 8d4cdc1 and e88aa8f.

📒 Files selected for processing (3)
  • .github/workflows/R-CMD-check.yaml
  • README.Rmd
  • README.md
🧰 Additional context used
🪛 markdownlint-cli2 (0.18.1)
README.md

141-141: Heading style
Expected: setext; Actual: atx

(MD003, heading-style)

🔍 Remote MCP searxng, sequentialthinking

Now let me conduct targeted searches for information that would help review this PR:## Summary of Relevant Context for PR Review

Based on my search findings, here is the concrete information that would help in reviewing this GitHub Actions CI pull request:

Workflow Configuration & Best Practices

The check-r-package action automatically prints testthat output and uploads the check directory as an artifact on failure, eliminating the need to do these explicitly in the workflow. The PR appears to follow this pattern, which is good.

The standard workflow pattern (check-standard) runs R CMD check using R-latest on Linux, Mac, and Windows, and using R-devel and R-oldrel on Linux, which is a good baseline if planning to submit the package to CRAN. The PR's configuration aligns with this recommended approach.

R CMD Check Flags

The PR specifies --no-manual and --compact-vignettes=gs+qpdf build arguments. These are standard optimization flags: The --no-manual flag prevents building the PDF manual even if \Sexprs are present, and --compact-vignettes with gs+qpdf option compacts PDF files under inst/doc.

Dependency Caching

The PR implements RSPM (R Package Manager) with dependency caching. The cache is likely to be of only limited benefit if already using RSPM to serve precompiled binaries, as the main case when caching is useful is after compiling packages from source. However, r-lib/actions by default caches only direct dependencies and only on a successful run, ensuring that the first commit made every day can make use of an existing cache even if builds take several minutes.

Cross-Platform Considerations

Important platform-specific issues to be aware of:

  • XQuartz needs to be installed to do plotting with the default quartz device on macOS
  • On Windows, when repos are checked out using git, line endings are automatically changed to CRLF, and R's check process specifically checks if configure.ac files have these line endings and will error if they do

Version Compatibility

Major version tags (like v2) mark breaking changes in r-lib/actions, and for the current version, the v2 tag should be used for more reliable and faster GHA jobs. The PR should verify it's using v2 compatible actions.

README Badge Integration

GitHub Actions badges in README display CI results and update automatically when re-run, providing at-a-glance understanding of package development state, and {usethis} adds these badges to README automatically. The PR correctly adds these badges.,

🔇 Additional comments (8)
README.Rmd (1)

100-102: GitHub Actions CI 배지 추가가 적절합니다.

새로운 CI 배지 섹션이 올바르게 추가되었으며, 배지 URL과 링크가 정확합니다.

기존의 Travis CI와 AppVeyor 배지가 유지되고 있는데, 연결된 이슈 #29에서 이들 레거시 CI 시스템의 유지 여부가 열린 질문으로 기록되어 있습니다. GitHub Actions가 안정화되면 이들 레거시 시스템을 단계적으로 제거하는 것을 고려해보세요.

.github/workflows/R-CMD-check.yaml (7)

3-8: 워크플로우 트리거 설정이 적절합니다.

main, master, develop 브랜치에 대한 push와 pull request 이벤트 트리거가 올바르게 설정되었으며, PR 목표와 일치합니다.


9-13: 워크플로우 이름과 권한 설정이 우수합니다.

워크플로우 이름이 명확하며, contents: read 권한만 설정하여 최소 권한 원칙을 준수하고 있습니다.


14-29: 매트릭스 구성이 r-lib/actions 모범 사례를 따릅니다.

5개의 구성(macOS, Windows, Ubuntu × devel/release/oldrel-1)이 잘 설정되어 있으며, CRAN 제출을 고려하는 패키지에 권장되는 표준 패턴입니다. fail-fast: false 설정으로 모든 구성의 결과를 확인할 수 있어 좋습니다.

라인 26의 http-user-agent: 'release' 설정은 ubuntu devel 환경에서 RSPM 바이너리 가용성을 위한 것으로 올바릅니다.


30-33: 환경 변수가 올바르게 설정되었습니다.

GITHUB_PATR_KEEP_PKG_SOURCE 설정이 R 패키지 체크를 위한 표준 구성을 따릅니다.


34-44: 설정 단계가 최신 모범 사례를 따릅니다.

v2 r-lib/actions 사용, Pandoc 설정, 그리고 use-public-rspm: true를 통한 사전 컴파일된 바이너리 활용이 적절합니다. 의존성 캐싱은 r-lib/actions에서 자동으로 처리됩니다.


45-49: 의존성 설치가 올바르게 구성되었습니다.

rcmdcheck 패키지를 포함한 필요한 의존성 설치가 적절하게 설정되어 있습니다.


50-53: R 패키지 체크 구성은 표준을 따르고 있으며, 특정 플랫폼 문제는 발견되지 않습니다.

check-r-package@v2 사용과 빌드 인수(--no-manual, --compact-vignettes=gs+qpdf)는 R 패키지의 표준 최적화입니다.

이전에 언급된 플랫폼별 우려사항은 이 리포지토리에는 적용되지 않습니다:

  • configure.ac 파일이 없으므로 Windows CRLF 문제는 해당 없음
  • 기본 R의 plot() 함수만 사용하므로 macOS XQuartz 요구사항 없음

현재 구성으로 충분합니다.

Comment thread README.md Outdated
@seonghobae
seonghobae marked this pull request as ready for review January 8, 2026 23:26
Copilot AI review requested due to automatic review settings January 8, 2026 23:26

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a comprehensive GitHub Actions CI workflow to replace Travis CI and AppVeyor, implementing automated R CMD check across multiple platforms and R versions. The workflow follows r-lib/actions best practices and provides unified CI status reporting.

Key Changes:

  • Implements GitHub Actions workflow using r-lib/actions v2 for R CMD check
  • Tests across 5 configurations: Ubuntu (devel, release, oldrel-1), macOS (release), and Windows (release)
  • Adds unified CI status badge to README files showing results across all platforms

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
.github/workflows/R-CMD-check.yaml New CI workflow implementing R CMD check with matrix strategy for multiple OS/R version combinations, using r-lib/actions v2 for dependency management and caching
README.Rmd Adds new "Continuous Integration" section with GitHub Actions badge for unified CI status
README.md Adds new "Continuous Integration" section with GitHub Actions badge for unified CI status (generated from README.Rmd)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/R-CMD-check.yaml Outdated
Comment thread README.Rmd Outdated
Comment thread README.md Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add GitHub Actions CI for tests

3 participants