Skip to content

fix link

fix link #37

Workflow file for this run

on:
push:
branches:
- master
- rc
pull_request:
branches:
- master
- development
name: R-CMD-check
# Increment this version when we want to clear cache
env:
cache-version: v1
jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
strategy:
fail-fast: false
matrix:
config:
- {os: ubuntu-20.04, r: 'devel' }
- {os: ubuntu-20.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
- {os: ubuntu-20.04, r: 'oldrel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
# need to manually set _R_CHECK_PACKAGE_NAME_ for R < ~3.4.4
# But we no longer test due to weird rspm failures, will test manually
# Also, tests fail due to possible changes in Unicode tables.
# - {os: ubuntu-20.04, r: '3.3', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest", rchkpkgname: "fansi"}
env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
RSPM: ${{ matrix.config.rspm }}
# don't treat missing suggested packages as error
_R_CHECK_FORCE_SUGGESTS_: false
_R_CHECK_PACKAGE_NAME_: ${{ matrix.config.rchkpkgname }}
steps:
- uses: actions/checkout@v2
- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
- uses: r-lib/actions/setup-pandoc@v2
- name: Query dependencies
run: |
install.packages('remotes')
saveRDS(remotes::dev_package_deps(dependencies = TRUE), "depends.Rds", version = 2)
shell: Rscript {0}
- name: Cache R packages
if: runner.os != 'Windows'
uses: actions/cache@v1
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ env.cache-version }}-${{ runner.os }}-r-${{ matrix.config.r }}-${{ hashFiles('depends.Rds') }}
restore-keys: ${{ env.cache-version }}-${{ runner.os }}-r-${{ matrix.config.r }}-
- name: Install system dependencies on Linux
if: runner.os == 'Linux'
run: |
sudo apt-get install libcurl4-openssl-dev
while read -r cmd
do
eval sudo $cmd
done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "20.04"))')
- name: Install dependencies
run: |
remotes::install_deps(dependencies = TRUE)
remotes::install_cran("rcmdcheck")
remotes::install_cran("covr")
shell: Rscript {0}
- name: Check
run: rcmdcheck::rcmdcheck(args = "--no-manual", error_on = "warning", check_dir = "check")
shell: Rscript {0}
- name: Upload check results
if: failure()
uses: actions/upload-artifact@master
with:
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
path: check
- name: Test coverage
run: |
options(covr.exclude_end="(?://|#)[[:space:]]*nocov[[:space:]]*end")
options(covr.exclude_start="(?://|#)[[:space:]]*nocov[[:space:]]*start")
options(covr.exclude_pattern="(?://|#)[[:space:]]*nocov")
covr::codecov()
shell: Rscript {0}