Skip to content

Minor corrections (doc + check ok) #231

Minor corrections (doc + check ok)

Minor corrections (doc + check ok) #231

Workflow file for this run

name: R-CMD-check
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
strategy:
fail-fast: false
matrix:
config:
- {os: windows-latest, r: 'release', vdiffr: true, xref: true}
- {os: macOS-latest, r: 'release', vdiffr: true, xref: true}
- {os: ubuntu-latest, r: 'devel', vdiffr: true, xref: true}
- {os: ubuntu-latest, r: 'release', vdiffr: true, xref: true}
# - {os: ubuntu-latest, r: 'oldrel-1'}
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
# Some packages might unavailable on the older versions, so let's ignore xref warnings
_R_CHECK_RD_XREFS_: ${{ matrix.config.xref }}
# Runs vdiffr test only on the latest version of R
VDIFFR_RUN_TESTS: ${{ matrix.config.vdiffr }}
VDIFFR_LOG_PATH: "../vdiffr.Rout.fail"
steps:
- uses: actions/checkout@v3
- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}
- uses: r-lib/actions/setup-pandoc@v2
- name: Query dependencies
run: |
install.packages('remotes')
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
shell: Rscript {0}
- name: Cache R packages
if: runner.os != 'Windows'
uses: actions/cache@v3
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-${{ matrix.config.r }}-1-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ runner.os }}-${{ matrix.config.r }}-1-
- name: Install system dependencies on Linux
if: runner.os == 'Linux'
run: |
sudo apt install libgdal-dev libproj-dev libgeos-dev libudunits2-dev texlive-latex-base
while read -r cmd
do
eval sudo $cmd
done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "18.04"))')
- name: Install dependencies
run: |
install.packages("remotes")
remotes::install_deps(dependencies = TRUE)
remotes::install_cran("rcmdcheck")
remotes::install_cran("rmarkdown")
remotes::install_cran("markdown")
shell: Rscript {0}
- name: Check
run: |
rcmdcheck::rcmdcheck(args = c("--no-manual","--as-cran"), error_on = "error", check_dir = "check")
shell: Rscript {0}
- name: Upload check results
if: failure()
uses: actions/upload-artifact@main
with:
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
path: check