more updates to fix r-cmd #16
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
branches: | |
- main | |
- master | |
pull_request: | |
branches: | |
- main | |
- master | |
schedule: | |
- cron: '1 23 * * Sun' | |
name: R-CMD-check | |
defaults: | |
run: | |
shell: Rscript {0} | |
jobs: | |
R-CMD-check: | |
name: ${{ matrix.os }}, R-${{ matrix.r}} | |
timeout-minutes: 30 | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- {os: macOS-latest, r: 'release'} | |
- {os: ubuntu-latest, r: 'release'} | |
- {os: windows-latest, r: 'release'} | |
runs-on: ${{ matrix.config.os }} | |
env: | |
R_REMOTES_NO_ERRORS_FROM_WARNINGS: 'true' | |
R_COMPILE_AND_INSTALL_PACKAGES: 'never' | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
RETICULATE_AUTOCONFIGURE: 'FALSE' | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: r-lib/actions/setup-r@v2 | |
id: setup-r | |
with: | |
r-version: ${{ matrix.config.r }} | |
use-public-rspm: true | |
- uses: r-lib/actions/setup-pandoc@v2 | |
- name: Install Homebrew (macOS only) | |
if: runner.os == 'macOS' | |
uses: Homebrew/actions/setup-homebrew@master | |
- name: Install qpdf (macOS only) | |
if: runner.os == 'macOS' | |
shell: bash | |
run: brew install qpdf | |
- name: Install system dependencies | |
if: runner.os == 'Linux' | |
shell: bash | |
run: | | |
. /etc/os-release | |
while read -r cmd | |
do | |
echo "$cmd" | |
sudo $cmd | |
done < <(Rscript -e "writeLines(remotes::system_requirements('$ID-$VERSION_ID'))") | |
- name: Install greta dependencies | |
shell: Rscript {0} | |
run: | | |
install.packages("greta", repos = c("https://greta-dev.r-universe.dev", "https://cloud.r-project.org")) | |
library(greta) | |
install_greta_deps(timeout = 120) | |
- name: Verify Greta Environment | |
run: | | |
library(greta) | |
greta::greta_sitrep() | |
shell: Rscript {0} | |
- name: Install package + deps | |
run: remotes::install_local(dependencies = TRUE, force = TRUE) | |
- name: R CMD check | |
run: rcmdcheck::rcmdcheck(args = '--no-manual', error_on = 'warning', check_dir = 'check') | |
- name: Session info | |
run: | | |
options(width = 100) | |
pkgs <- installed.packages()[, "Package"] | |
sessioninfo::session_info(pkgs, include_base = TRUE) |