PR for Base Unit Tests and CI (#51) #1
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
name: Unit and build tests | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
workflow_dispatch: | |
branches: [ master ] | |
jobs: | |
tests: | |
runs-on: ${{ matrix.config.os }} | |
name: ${{ matrix.config.os }} (${{ matrix.config.r }}) | |
strategy: | |
matrix: | |
config: | |
- {os: macos-latest, r: 'release'} | |
- {os: ubuntu-latest, r: 'release'} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up R | |
uses: r-lib/actions/setup-r@v2 | |
with: | |
r-version: ${{ matrix.config.r }} | |
use-public-rspm: true | |
- name: Install dependencies | |
uses: r-lib/actions/setup-r-dependencies@v2 | |
with: | |
extra-packages: | | |
any::devtools | |
any::knitr | |
any::formatR | |
any::testthat | |
any::haven | |
any::lfe | |
needs: | | |
devtools | |
knitr | |
rmarkdown | |
testthat | |
haven | |
lfe | |
- name: Setup pandoc | |
uses: r-lib/actions/setup-pandoc@v2 | |
- name: Setup LaTeX | |
uses: r-lib/actions/setup-tinytex@v2 | |
- name: Check build | |
run: | | |
devtools::document() | |
devtools::check() | |
shell: Rscript {0} |