Skip to content

Promote internal hsi_check_saturation to package #121

Promote internal hsi_check_saturation to package

Promote internal hsi_check_saturation to package #121

Workflow file for this run

# R CMD check across the standard r-lib matrix.
# Adapted from r-lib/actions check-standard for HSItools:
# - Quarto setup added (vignettes are .qmd)
# - triggers on both main and dev (public repo: Actions minutes are free)
# - _R_CHECK_FORCE_SUGGESTS_ disabled (Suggests packages are guarded by
# skip helpers in tests; check must not fail on their absence)
#
# Location in repo: .github/workflows/R-CMD-check.yaml
on:
push:
branches: [main, dev]
pull_request:
branches: [main, dev]
workflow_dispatch:
name: R-CMD-check.yaml
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: quarto-dev/quarto-actions/setup@v2
- 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
# The Windows runner image ships a preinstalled system R that quarto
# can discover via the Windows Registry instead of the setup-r install.
# QUARTO_R pins quarto to the R actually running the check. NOTE: this
# is correct configuration but NOT sufficient to fix the Windows
# vignette failure (see the check step below).
- name: Point quarto at the setup-r R installation (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
$rbin = Split-Path (Get-Command Rscript.exe).Source
echo "QUARTO_R=$rbin" >> $env:GITHUB_ENV
# KNOWN LIMITATION (2026-07-11): quarto's knitr-engine subprocess loses
# the R_LIBS temp package library on Windows runners, so R CMD build
# cannot rebuild .qmd vignettes there ("there is no package called
# 'HSItools'"). Tried and insufficient: same-drive TMPDIR, QUARTO_R.
# Upstream (quarto CLI) issue. Windows therefore checks with vignettes
# skipped; vignette building is still verified on macOS + 3x ubuntu and
# locally on Windows. Revisit on quarto releases.
- uses: r-lib/actions/check-r-package@v2
env:
_R_CHECK_FORCE_SUGGESTS_: false
# Same-drive temp: guards the known cross-drive Quarto path bug
# (mirrors the local TMPDIR=C:/rtemp fix). No-op on macOS/Linux.
TMPDIR: ${{ runner.temp }}
TMP: ${{ runner.temp }}
TEMP: ${{ runner.temp }}
with:
upload-snapshots: true
build_args: ${{ runner.os == 'Windows' && 'c("--no-manual", "--no-build-vignettes")' || 'c("--no-manual", "--compact-vignettes=gs+qpdf")' }}
args: ${{ runner.os == 'Windows' && 'c("--no-manual", "--as-cran", "--ignore-vignettes")' || 'c("--no-manual", "--as-cran")' }}