Skip to content

fix tests

fix tests #80

# Workflow derived from https:/r-lib/actions/tree/master/examples
# Need help debugging build failures? Start at https:/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master, development]
paths-ignore:
- 'README.**'
pull_request:
branches: [main, master, development]
paths-ignore:
- 'README.**'
name: R-CMD-check
jobs:
R-CMD-check:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes
steps:
- uses: actions/checkout@v2
- name: Checkout posteriordb repo
uses: actions/checkout@v2
with:
repository: stan-dev/posteriordb
path: posteriordb
- name: Set PDB path
run: export PDB_PATH=$GITHUB_WORKSPACE"/posteriordb";echo $PDB_PATH;echo PDB_PATH="$PDB_PATH" >> ~/.Renviron;ls $PDB_PATH
shell: bash
- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
- uses: r-lib/actions/setup-r-dependencies@v1
with:
extra-packages: rcmdcheck
- name: Check
env:
_R_CHECK_CRAN_INCOMING_: false
run: |
options(crayon.enabled = TRUE)
rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
shell: Rscript {0}
- name: Show testthat output
if: always()
run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true
shell: bash
- name: Upload check results
if: failure()
uses: actions/upload-artifact@main
with:
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
path: check