Add GitHub Actions CI workflow for R CMD check - #30
Conversation
Co-authored-by: seonghobae <8172694+seonghobae@users.noreply.github.com>
|
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 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. 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughGitHub Actions 워크플로우를 추가하여 여러 OS(macOS, Windows, Ubuntu)와 R 버전(devel, release, oldrel-1)에서 자동으로 R 패키지 검사를 수행하도록 구성했습니다. README 파일에 CI 배지 정보를 추가하여 지속적 통합 상태를 표시합니다. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Comment |
Co-authored-by: seonghobae <8172694+seonghobae@users.noreply.github.com>
Co-authored-by: seonghobae <8172694+seonghobae@users.noreply.github.com>
There was a problem hiding this comment.
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.
📒 Files selected for processing (3)
.github/workflows/R-CMD-check.yamlREADME.RmdREADME.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_PAT과R_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 요구사항 없음현재 구성으로 충분합니다.
There was a problem hiding this comment.
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.
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, anddevelop.Changes
.github/workflows/R-CMD-check.yaml: CI workflow using r-lib/actions v2README: Added GitHub Actions badge showing unified CI status across all platforms
Details
The workflow uses
r-lib/actions/check-r-package@v2for 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
💡 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.