Skip to content

Made the off line reports shine even more #26

Made the off line reports shine even more

Made the off line reports shine even more #26

Workflow file for this run

# For help debugging build failures open an issue on the RStudio community with the 'github-actions' tag.
# https://community.rstudio.com/new-topic?category=Package%20development&tags=github-actions
#
# https://github.com/r-lib/actions/tree/master/examples
# https://tomasvotruba.com/blog/2020/01/27/switch-travis-to-github-actions-to-reduce-stress/
# https://stackoverflow.com/questions/58139175/running-actions-in-another-directory
name: R tests
on:
push:
branches:
- master
paths:
- r/**
pull_request:
paths:
- r/**
jobs:
R_tests:
runs-on: ${{ matrix.os }}
name: pdstools (R ${{ matrix.r-version }}) on ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-latest, macOS-latest]
r-version: [release]
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
- uses: r-lib/actions/setup-r@v2
- uses: r-lib/actions/setup-pandoc@v2
- name: Install dependencies
working-directory: ./r
run: |
install.packages(c("remotes", "rcmdcheck"))
remotes::install_deps(dependencies = TRUE)
remotes::install_cran("covr")
shell: Rscript {0}
- name: Cache packages
uses: actions/cache@v2
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
- name: Run tests
working-directory: ./r
run: |
rcmdcheck::rcmdcheck(args = "--no-manual", error_on = "error")
shell: Rscript {0}
- name: Test coverage
working-directory: ./r
run: |
covr::codecov()
shell: Rscript {0}