R CMD CHECK #240
This file contains hidden or 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
on: | |
push: | |
pull_request: | |
# for now, CRON jobs only run on the default branch of the repo (i.e. usually on master) | |
schedule: | |
# * is a special character in YAML so you have to quote this string | |
# set to run 3AM each Wednesday | |
- cron: "0 4 * * 3" | |
name: R CMD CHECK | |
jobs: | |
build: | |
runs-on: ${{ matrix.config.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
# comment out lines if you do not want to build on certain platforms | |
- { os: windows-latest, r: "release" } | |
- { os: macOS-latest, r: "release", pkgdown: "true" } | |
#- { os: macOS-latest, r: "devel" } | |
- { os: ubuntu-latest, r: "release" } | |
steps: | |
- name: Checkout V2 | |
uses: actions/checkout@v2 | |
- name: Set up R ${{ matrix.config.r }} | |
uses: r-lib/actions/setup-r@HEAD | |
with: | |
r-version: ${{ matrix.config.r }} | |
- name: Set up pandoc | |
uses: r-lib/actions/setup-pandoc@HEAD | |
if: matrix.config.image == null | |
- name: Install remotes | |
run: | | |
install.packages('remotes') | |
shell: Rscript {0} | |
- name: Install system dependencies | |
if: runner.os == 'Linux' | |
env: | |
RHUB_PLATFORM: linux-x86_64-ubuntu-gcc | |
run: | | |
sudo apt-get update && sudo apt-get -y install libcurl4-openssl-dev | |
- name: Install dependencies | |
run: | | |
remotes::install_deps(dependencies = TRUE) | |
remotes::install_cran("sessioninfo") | |
remotes::install_cran("rcmdcheck") | |
shell: Rscript {0} | |
- name: Session info | |
run: | | |
options(width = 100) | |
pkgs <- installed.packages()[, "Package"] | |
sessioninfo::session_info(pkgs, include_base = TRUE) | |
shell: Rscript {0} | |
- name: Check | |
run: rcmdcheck::rcmdcheck(args = "--no-manual", error_on = "error") | |
shell: Rscript {0} | |
- name: Show testthat output | |
if: always() | |
run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true | |
shell: bash | |
- name: Test coverage | |
if: matrix.config.os == 'macOS-latest' | |
run: | | |
install.packages("covr") | |
covr::codecov(token = "${{secrets.CODECOV_TOKEN}}") | |
shell: Rscript {0} |