Skip to content

Merge pull request #194 from jr-leary7/dev #170

Merge pull request #194 from jr-leary7/dev

Merge pull request #194 from jr-leary7/dev #170

Workflow file for this run

# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Additional formatting taken from: https://github.com/r-lib/actions/blob/v2-branch/check-r-package/action.yaml
on:
push:
branches:
- dev
- main
name: R-CMD-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: 'release'}
- {os: windows-latest, r: 'release'}
- {os: ubuntu-latest, r: 'release'}
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Setup Pandoc
uses: r-lib/actions/setup-pandoc@v2
- name: Setup R
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: Setup dependencies
uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::rcmdcheck
needs: check
- name: Extra dependencies
id: extra-deps
run: |
install.packages("Matrix", type = "source", force = TRUE)
install.packages("irlba", type = "source", force = TRUE)
install.packages("TMB", type = "source", force = TRUE)
install.packages("glmmTMB", type = "source", force = TRUE)
shell: Rscript {0}
working-directory: '.'
- name: Check
id: rcmdcheck
run: |
## --------------------------------------------------------------------
options(crayon.enabled = TRUE)
cat("check-dir-path=", file.path(getwd(), "check"), "\n", file = Sys.getenv("GITHUB_OUTPUT"), sep = "", append = TRUE)
check_results <- rcmdcheck::rcmdcheck(args = c("--no-vignettes", "--no-manual", "--as-cran"), build_args = c("--no-build-vignettes", "--no-manual"), check_dir = "check", error_on = "error")
shell: Rscript {0}
working-directory: '.'
- name: Show testthat output
if: always()
run: |
## --------------------------------------------------------------------
echo ::group::Show testthat output
find check -name 'testthat.Rout*' -exec cat '{}' \; || true
echo ::endgroup::
shell: bash
working-directory: '.'
- name: Upload check results
if: failure()
uses: actions/upload-artifact@v3
with:
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
path: ${{ steps.rcmdcheck.outputs.check-dir-path }}
- name: Upload snapshots
uses: actions/upload-artifact@v3
with:
name: ${{ runner.os }}-r${{ matrix.config.r }}-testthat-snapshots
path: ${{ steps.rcmdcheck.outputs.check-dir-path }}/**/tests*/testthat/_snaps
if-no-files-found: ignore