From 99de2a93da8a1f1caeb7dde858c3fcd54365d64d Mon Sep 17 00:00:00 2001 From: Jim Hester Date: Mon, 7 Oct 2019 10:10:49 -0400 Subject: [PATCH] Add R starter workflow This adds a workflow for [R packages](https://www.r-project.org/). It uses a [setup-r](https://github.com/r-lib/actions/tree/master/setup-r) action and two R packages - [remotes](https://remotes.r-lib.org/) - to install the R package dependencies - [rcmdcheck](https://github.com/r-lib/rcmdcheck) - to run and format the output of the package checking tool used in the R ecosystem. --- ci/properties/r.properties.json | 6 ++++++ ci/r.yml | 23 +++++++++++++++++++++++ icons/r.svg | 14 ++++++++++++++ 3 files changed, 43 insertions(+) create mode 100644 ci/properties/r.properties.json create mode 100644 ci/r.yml create mode 100644 icons/r.svg diff --git a/ci/properties/r.properties.json b/ci/properties/r.properties.json new file mode 100644 index 0000000..a9c6c61 --- /dev/null +++ b/ci/properties/r.properties.json @@ -0,0 +1,6 @@ +{ + "name": "R package", + "description": "Create and test an R package on multiple R versions.", + "iconName": "R", + "categories": ["R"] +} diff --git a/ci/r.yml b/ci/r.yml new file mode 100644 index 0000000..fb959bf --- /dev/null +++ b/ci/r.yml @@ -0,0 +1,23 @@ +name: R + +on: [push] + +jobs: + build: + + runs-on: macOS-latest + strategy: + max-parallel: 4 + matrix: + r-version: [3.5.3, 3.6.1] + + steps: + - uses: actions/checkout@v1 + - name: Set up R ${{ matrix.r-version }} + uses: rlib/actions/setup-r@v1 + with: + r-version: ${{ matrix.r-version }} + - name: Install dependencies + run: Rscript -e "install.packages(c('remotes', 'rcmdcheck'))" -e "remotes::install_deps(dependencies = TRUE)" + - name: Check + run: Rscript -e "rcmdcheck::rcmdcheck(args = '--no-manual', error_on = 'error')" diff --git a/icons/r.svg b/icons/r.svg new file mode 100644 index 0000000..78281f7 --- /dev/null +++ b/icons/r.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + +