Skip to content

Commit

Permalink
Added additional github actions
Browse files Browse the repository at this point in the history
Also updated cran-comments and added revdep to
.gitignore
  • Loading branch information
NikNakk committed Jul 19, 2020
1 parent ce0da62 commit d4f7f79
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 5 deletions.
62 changes: 59 additions & 3 deletions .github/workflows/R-CMD-check.yaml
Expand Up @@ -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
1 change: 1 addition & 0 deletions .gitignore
@@ -1,3 +1,4 @@
.Rproj.user
.Rhistory
.RData
revdep
10 changes: 8 additions & 2 deletions 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.

0 comments on commit d4f7f79

Please sign in to comment.