From d4f7f79e738dbedf399958b85dfaa6dc2d5085c3 Mon Sep 17 00:00:00 2001 From: Nick Kennedy Date: Sun, 19 Jul 2020 11:14:09 +0100 Subject: [PATCH] Added additional github actions Also updated cran-comments and added revdep to .gitignore --- .github/workflows/R-CMD-check.yaml | 62 ++++++++++++++++++++++++++++-- .gitignore | 1 + cran-comments.md | 10 ++++- 3 files changed, 68 insertions(+), 5 deletions(-) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index abe7119..1f2d1b0 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -10,15 +10,71 @@ name: R-CMD-check jobs: R-CMD-check: - runs-on: macOS-latest + runs-on: ${{ matrix.config.os }} + + name: ${{ matrix.config.os }} (${{ matrix.config.r }}) + + strategy: + fail-fast: false + matrix: + config: + - {os: windows-latest, r: 'release'} + - {os: macOS-latest, r: 'release'} + - {os: macOS-latest, r: 'devel'} + - {os: ubuntu-16.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"} + + env: + R_REMOTES_NO_ERRORS_FROM_WARNINGS: true + RSPM: ${{ matrix.config.rspm }} + steps: - uses: actions/checkout@v2 + - uses: r-lib/actions/setup-r@master + with: + r-version: ${{ matrix.config.r }} + + - uses: r-lib/actions/setup-pandoc@master + + - name: Query dependencies + run: | + install.packages('remotes') + saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2) + writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version") + shell: Rscript {0} + + - name: Cache R packages + if: runner.os != 'Windows' + uses: actions/cache@v1 + 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: Install system dependencies + if: runner.os == 'Linux' + env: + RHUB_PLATFORM: linux-x86_64-ubuntu-gcc + run: | + Rscript -e "remotes::install_github('r-hub/sysreqs')" + sysreqs=$(Rscript -e "cat(sysreqs::sysreq_commands('DESCRIPTION'))") + sudo -s eval "$sysreqs" + - name: Install dependencies run: | - install.packages(c("remotes", "rcmdcheck", "vctrs")) remotes::install_deps(dependencies = TRUE) + remotes::install_cran("rcmdcheck") shell: Rscript {0} + - name: Check - run: rcmdcheck::rcmdcheck(args = "--no-manual", error_on = "error") + env: + _R_CHECK_CRAN_INCOMING_REMOTE_: false + run: rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), 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 diff --git a/.gitignore b/.gitignore index 807ea25..b5e8c48 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ .Rproj.user .Rhistory .RData +revdep diff --git a/cran-comments.md b/cran-comments.md index 266c0b5..5ab8add 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,10 +1,16 @@ ## Test environments -* local Windows 7 install, R 3.6.1 -* ubuntu 16.04 (on travis-ci), R 3.6.1, R 3.5.3 and R-devel (2019-12-03 r77506) +* local Windows 10 install, R 4.0.2 +* ubuntu 16.04 (on travis-ci), R 3.6.3, R 4.0.0 and R-devel (2019-07-19 r78874) * win-builder (R-devel) +* AppVeyor Windows Server 2012, R 4.0.2 +* MacOS X 10.15.5, R 4.0.2 ## R CMD check results There were no ERRORs, WARNINGs or NOTEs. ## Downstream dependencies live +ezcox +metawho + +All were tested using the `revdepcheck` package.