Skip to content

try new github action for R CMD CHECK #205

try new github action for R CMD CHECK

try new github action for R CMD CHECK #205

Workflow file for this run

name: R-CMD-check
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
schedule:
- cron: '0 0 * * 0' # Runs every Sunday at midnight
permissions:
contents: read
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
steps:
- name: Checkout repository
uses: actions/checkout@v4 # Checkout the code
- name: Set up TinyTeX
uses: r-lib/actions/setup-tinytex@v2
- name: Install LaTeX packages
run: |
if [[ "$RUNNER_OS" == "Linux" || "$RUNNER_OS" == "macOS" ]]; then
tlmgr install \
parskip \
geometry \
koma-script \
sectsty \
titlesec \
natbib \
lastpage \
hyperref
elif [[ "$RUNNER_OS" == "Windows" ]]; then
tlmgr install parskip geometry koma-script sectsty titlesec natbib lastpage hyperref
fi
- name: Set up R
uses: r-lib/actions/setup-r@v2
with:
r-version: 'latest' # Use the latest stable version of R
- name: Install R package dependencies
run: |
install.packages(c("remotes", "rcmdcheck"))
remotes::install_deps(dependencies = TRUE, upgrade = "never")
shell: Rscript {0} # Use Rscript explicitly
- name: Check R package
run: rcmdcheck::rcmdcheck(args = "--as-cran", error_on = "error") # Use --as-cran to check the manual as well
shell: Rscript {0} # Explicitly set Rscript shell for the check