MCP HubMCP Hub
스킬 목록으로 돌아가기

setup-github-actions-ci

pjt222
업데이트됨 2 days ago
3 조회
17
2
17
GitHub에서 보기
테스팅testingautomation

정보

이 스킬은 R 패키지를 위한 GitHub Actions CI/CD 워크플로우 설정을 자동화하며, 다양한 플랫폼에서의 R CMD 체크, 테스트 커버리지 보고, pkgdown 사이트 배포를 처리합니다. 표준 r-lib/actions를 활용하며, 초기 패키지 설정이나 기존 프로젝트에 고급 자동화를 추가하는 데 이상적입니다. 개발자는 이를 통해 강력한 다중 플랫폼 테스트와 문서 배포를 빠르게 구축할 수 있습니다.

빠른 설치

Claude Code

추천
기본
npx skills add pjt222/agent-almanac -a claude-code
플러그인 명령대체
/plugin add https://github.com/pjt222/agent-almanac
Git 클론대체
git clone https://github.com/pjt222/agent-almanac.git ~/.claude/skills/setup-github-actions-ci

Claude Code에서 이 명령을 복사하여 붙여넣어 스킬을 설치하세요

문서

Set Up GitHub Actions CI for R Packages

Configure automated R CMD check, test coverage, and documentation deployment via GitHub Actions.

When to Use

  • Setting up CI/CD for a new R package on GitHub
  • Adding multi-platform testing to an existing package
  • Configuring automated pkgdown site deployment
  • Adding code coverage reporting

Inputs

  • Required: R package with valid DESCRIPTION and tests
  • Required: GitHub repository (public or private)
  • Optional: Whether to include pkgdown deployment (default: no)
  • Optional: Whether to include coverage reporting (default: no)

Procedure

Step 1: Create R CMD Check Workflow

Create .github/workflows/R-CMD-check.yaml:

on:
  push:
    branches: [main, master]
  pull_request:
    branches: [main, master]

name: R-CMD-check
locale: caveman
source_locale: en
source_commit: 82c77053
translator: "Julius Brussee homage — caveman"
translation_date: "2026-04-19"

permissions: read-all

jobs:
  R-CMD-check:
    runs-on: ${{ matrix.config.os }}

    name: ${{ matrix.config.os }} (${{ matrix.config.r }})

    strategy:
      fail-fast: false
      matrix:
        config:
          - {os: macos-latest, r: 'release'}
          - {os: windows-latest, r: 'release'}
          - {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
          - {os: ubuntu-latest, r: 'release'}
          - {os: ubuntu-latest, r: 'oldrel-1'}

    env:
      GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
      R_KEEP_PKG_SOURCE: yes

    steps:
      - uses: actions/checkout@v4

      - uses: r-lib/actions/setup-pandoc@v2

      - uses: r-lib/actions/setup-r@v2
        with:
          r-version: ${{ matrix.config.r }}
          http-user-agent: ${{ matrix.config.http-user-agent }}
          use-public-rspm: true

      - uses: r-lib/actions/setup-r-dependencies@v2
        with:
          extra-packages: any::rcmdcheck
          needs: check

      - uses: r-lib/actions/check-r-package@v2
        with:
          upload-snapshots: true
          build_args: 'c("--no-manual", "--compact-vignettes=gs+qpdf")'

Expected: Workflow file .github/workflows/R-CMD-check.yaml created with a multi-platform matrix (macOS, Windows, Ubuntu) covering release, devel, and oldrel.

On failure: If the .github/workflows/ directory does not exist, create it with mkdir -p .github/workflows. Verify YAML syntax with a YAML linter.

Step 2: Create Test Coverage Workflow (Optional)

Create .github/workflows/test-coverage.yaml:

on:
  push:
    branches: [main, master]
  pull_request:
    branches: [main, master]

name: test-coverage
locale: caveman
source_locale: en
source_commit: 82c77053
translator: "Julius Brussee homage — caveman"
translation_date: "2026-04-19"

permissions: read-all

jobs:
  test-coverage:
    runs-on: ubuntu-latest

    env:
      GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

    steps:
      - uses: actions/checkout@v4

      - uses: r-lib/actions/setup-r@v2
        with:
          use-public-rspm: true

      - uses: r-lib/actions/setup-r-dependencies@v2
        with:
          extra-packages: any::covr, any::xml2
          needs: coverage

      - name: Test coverage
        run: |
          cov <- covr::package_coverage(
            quiet = FALSE,
            clean = FALSE,
            install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package")
          )
          covr::to_cobertura(cov)
        shell: Rscript {0}

      - uses: codecov/codecov-action@v4
        with:
          fail_ci_if_error: ${{ github.event_name != 'pull_request' && true || false }}
          file: ./cobertura.xml
          plugin: noop
          token: ${{ secrets.CODECOV_TOKEN }}

Expected: Workflow file .github/workflows/test-coverage.yaml created. Coverage reports will be uploaded to Codecov on each push and PR.

On failure: If Codecov upload fails, verify the CODECOV_TOKEN secret is set in the repository settings. For public repos, the token may be optional.

Step 3: Create pkgdown Deployment Workflow (Optional)

Create .github/workflows/pkgdown.yaml:

on:
  push:
    branches: [main, master]
  release:
    types: [published]
  workflow_dispatch:

name: pkgdown
locale: caveman
source_locale: en
source_commit: 82c77053
translator: "Julius Brussee homage — caveman"
translation_date: "2026-04-19"

permissions:
  contents: write
  pages: write

jobs:
  pkgdown:
    runs-on: ubuntu-latest

    env:
      GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

    steps:
      - uses: actions/checkout@v4

      - uses: r-lib/actions/setup-pandoc@v2

      - uses: r-lib/actions/setup-r@v2
        with:
          use-public-rspm: true

      - uses: r-lib/actions/setup-r-dependencies@v2
        with:
          extra-packages: any::pkgdown, local::.
          needs: website

      - name: Build site
        run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
        shell: Rscript {0}

      - name: Deploy to GitHub pages
        if: github.event_name != 'pull_request'
        uses: JamesIves/github-pages-deploy-action@v4
        with:
          clean: false
          branch: gh-pages
          folder: docs

Expected: Workflow file .github/workflows/pkgdown.yaml created. Site builds and deploys to gh-pages branch on push to main or release.

On failure: If deployment fails, ensure the repository has contents: write permissions enabled. Verify _pkgdown.yml has development: mode: release set.

Step 4: Add Status Badge to README

Add to README.md:

[![R-CMD-check](https://github.com/USERNAME/REPO/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/USERNAME/REPO/actions/workflows/R-CMD-check.yaml)

Expected: README displays a live CI status badge that updates automatically after each workflow run.

On failure: If the badge shows "no status," verify the workflow filename in the badge URL matches the actual file. Push a commit to trigger the first workflow run.

Step 5: Configure GitHub Repository Settings

  1. Enable GitHub Pages (Settings > Pages) pointing to gh-pages branch if using pkgdown
  2. Add CODECOV_TOKEN secret if using coverage reporting
  3. Ensure GITHUB_TOKEN has appropriate permissions

Expected: GitHub Pages is configured for pkgdown deployment. Required secrets are set. Token permissions are sufficient for the workflows.

On failure: If Pages deployment fails, check Settings > Pages to ensure the source is set to the gh-pages branch. If secrets are missing, add them under Settings > Secrets and variables > Actions.

Step 6: Push and Verify

git add .github/
git commit -m "Add GitHub Actions CI workflows"
git push

Check the Actions tab on GitHub to verify workflows run successfully.

Expected: Green checkmarks on all jobs in the GitHub Actions tab. Workflows trigger on both push and PR events.

On failure: Check workflow logs in the Actions tab. Common issues: missing system dependencies (add to extra-packages), vignette build failures (ensure pandoc setup step is present), YAML syntax errors.

Validation

  • R CMD check passes on all matrix platforms
  • Coverage report generates (if configured)
  • pkgdown site deploys (if configured)
  • Status badge shows in README
  • Workflows trigger on both push and PR

Common Pitfalls

  • Missing permissions: GitHub Actions now requires explicit permissions. Add permissions: read-all at minimum
  • System dependencies: Some R packages need system libraries. Use r-lib/actions/setup-r-dependencies which handles most cases
  • Vignettes without pandoc: Always include r-lib/actions/setup-pandoc@v2
  • pkgdown development mode: Ensure _pkgdown.yml has development: mode: release for GitHub Pages
  • Caching issues: r-lib/actions/setup-r-dependencies handles caching automatically

Related Skills

  • create-r-package - initial package setup including CI workflow
  • build-pkgdown-site - detailed pkgdown configuration
  • submit-to-cran - CI checks should mirror CRAN expectations
  • release-package-version - trigger deployment on release

GitHub 저장소

pjt222/agent-almanac
경로: i18n/caveman/skills/setup-github-actions-ci
0
agentsagentskillsai-assisted-developmentclaude-codeskillsteams

연관 스킬

evaluating-llms-harness

테스팅

이 Claude Skill은 MMLU, GSM8K를 포함한 60개 이상의 표준화된 학술 과제에서 LLM 성능을 벤치마크하기 위해 lm-evaluation-harness를 실행합니다. 개발자들이 모델 품질을 비교하고, 학습 진행 상황을 추적하거나 학술 결과를 보고할 수 있도록 설계되었습니다. 이 도구는 HuggingFace와 vLLM 모델을 포함한 다양한 백엔드를 지원합니다.

스킬 보기

cloudflare-cron-triggers

테스팅

이 스킬은 cron 표현식을 사용하여 Worker를 스케줄링하기 위한 Cloudflare Cron Triggers 구현에 관한 포괄적인 지식을 제공합니다. 주기적 작업, 유지보수 작업, 자동화된 워크플로우 설정 방법을 다루며, 잘못된 cron 표현식이나 시간대 문제 같은 일반적인 이슈들을 해결하는 방법을 포함합니다. 개발자들은 이를 통해 스케줄된 핸들러 구성, cron 트리거 테스트, Workflows 및 Green Compute와의 연동 작업을 수행할 수 있습니다.

스킬 보기

webapp-testing

테스팅

이 Claude Skill은 Python 스크립트를 통해 로컬 웹 애플리케이션을 테스트하기 위한 Playwright 기반 툴킷을 제공합니다. 프론트엔드 검증, UI 디버깅, 스크린샷 캡처, 로그 확인 기능을 지원하며 서버 라이프사이클을 관리합니다. 브라우저 자동화 작업에 사용하되 컨텍스트 오염을 방지하기 위해 소스 코드를 읽지 않고 스크립트를 직접 실행하세요.

스킬 보기

finishing-a-development-branch

테스팅

이 스킬은 테스트 통과를 확인한 후 체계적인 통합 옵션을 제시하여 개발자가 완성된 작업을 마무리하도록 돕습니다. 구현이 완료된 후 머지, PR 생성, 브랜치 정리와 같은 워크플로우를 안내합니다. 코드가 준비되고 테스트가 완료되었을 때 개발 프로세스를 체계적으로 마무리하기 위해 사용하세요.

스킬 보기