Prepare for dev #80
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
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples | |
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help | |
# https://github.com/easystats/workflows/blob/main/.github/workflows/R-CMD-check.yaml | |
on: | |
push: | |
branches: [main, master] | |
pull_request: | |
branches: [main, master] | |
name: R-check | |
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: 'devel'} | |
- {os: macOS-latest, r: 'release'} | |
- {os: macOS-latest, r: 'oldrel'} | |
- {os: windows-latest, r: 'devel'} | |
- {os: windows-latest, r: 'release'} | |
- {os: windows-latest, r: 'oldrel'} | |
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'} | |
- {os: ubuntu-latest, r: 'release'} | |
- {os: ubuntu-latest, r: 'oldrel'} | |
env: | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
R_KEEP_PKG_SOURCE: yes | |
_R_CHECK_CRAN_INCOMING_: false | |
_R_CHECK_FORCE_SUGGESTS_: false | |
_R_CHECK_STOP_ON_INVALID_NUMERIC_VERSION_INPUTS_: true | |
steps: | |
- uses: actions/checkout@v3 | |
# Always try to use the latest pandoc version | |
# https://github.com/jgm/pandoc/releases | |
- uses: r-lib/actions/setup-pandoc@v2 | |
with: | |
pandoc-version: '3.1.11' | |
- 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 | |
- name: Install packages from source | |
run: | | |
install.packages(c("Matrix", "TMB"), type = "source") | |
shell: Rscript {0} | |
# TODO: Check which of the ignore conditions are still relevant given the | |
# current suggested dependencies and the minimum supported R version. | |
# Update if anything out of date or not needed anymore. | |
# | |
# `{EGAnet}` needs `{XML}`, and there are currently issues in downloading | |
# it for certain R versions. So just don't install it for now. | |
- uses: r-lib/actions/setup-r-dependencies@v2 | |
with: | |
pak-version: devel | |
extra-packages: | | |
any::rcmdcheck | |
MuMIn=?ignore-before-r=4.2.0 | |
Matrix=?ignore-before-r=100.0.0 | |
needs: check | |
# install *after* other deps to avoid FreeADFunObject error | |
# glmmTMB uses `deparse1()`, which was introduced in R 4.0 | |
- name: Install other packages from source | |
run: | | |
if (getRversion() >= "4.0.0") { | |
install.packages(c("mmrm", "MatrixModels", "glmmTMB", "lme4"), type = "source") | |
} | |
shell: Rscript {0} | |
# Don't error on "note" because if any of the suggested packages are not available | |
# for a given R version, this generates a NOTE causing unnecessary build failure | |
- uses: r-lib/actions/check-r-package@v2 | |
with: | |
error-on: '"warning"' | |
upload-snapshots: true |