From 99de2a93da8a1f1caeb7dde858c3fcd54365d64d Mon Sep 17 00:00:00 2001 From: Jim Hester Date: Mon, 7 Oct 2019 10:10:49 -0400 Subject: [PATCH 1/4] 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 @@ + + + + + + + + + + + + + + From 1c2ed214e050c66dc35b215aa1353d5574e6c17b Mon Sep 17 00:00:00 2001 From: Jim Hester Date: Thu, 16 Apr 2020 13:31:59 -0400 Subject: [PATCH 2/4] Update R workflow based on review feedback --- ci/r.yml | 40 +++++++++++++++++++++++++++------------- 1 file changed, 27 insertions(+), 13 deletions(-) diff --git a/ci/r.yml b/ci/r.yml index fb959bf..cad232b 100644 --- a/ci/r.yml +++ b/ci/r.yml @@ -1,23 +1,37 @@ +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. +# +# See https://github.com/r-lib/actions/tree/master/examples#readme for +# additional example workflows available for the R community. + name: R -on: [push] +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] jobs: build: - runs-on: macOS-latest strategy: - max-parallel: 4 matrix: - r-version: [3.5.3, 3.6.1] + r-version: [3.5, 3.6] 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')" + - uses: actions/checkout@v2 + - name: Set up R ${{ matrix.r-version }} + uses: r-lib/actions/setup-r@ffe45a39586f073cc2e9af79c4ba563b657dc6e3 + with: + r-version: ${{ matrix.r-version }} + - name: Install dependencies + run: | + install.packages(c("remotes", "rcmdcheck")) + remotes::install_deps(dependencies = TRUE) + shell: Rscript {0} + - name: Check + run: rcmdcheck::rcmdcheck(args = "--no-manual", error_on = "error") + shell: Rscript {0} From fae2392dd2801d3741150afe43ac3df1bb5d57dc Mon Sep 17 00:00:00 2001 From: Jim Hester Date: Fri, 21 Aug 2020 09:24:31 -0400 Subject: [PATCH 3/4] Update ci/r.yml Co-authored-by: Andy McKay --- ci/r.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/r.yml b/ci/r.yml index cad232b..efc6587 100644 --- a/ci/r.yml +++ b/ci/r.yml @@ -10,9 +10,9 @@ name: R on: push: - branches: [ master ] + branches: [ $default-branch ] pull_request: - branches: [ master ] + branches: [ $default-branch ] jobs: build: From dc7a645261e96af0083db1398c7e0b912d1c6688 Mon Sep 17 00:00:00 2001 From: Andy McKay Date: Fri, 21 Aug 2020 08:25:55 -0700 Subject: [PATCH 4/4] Update ci/properties/r.properties.json --- ci/properties/r.properties.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/properties/r.properties.json b/ci/properties/r.properties.json index a9c6c61..84ba0ec 100644 --- a/ci/properties/r.properties.json +++ b/ci/properties/r.properties.json @@ -1,6 +1,6 @@ { "name": "R package", "description": "Create and test an R package on multiple R versions.", - "iconName": "R", + "iconName": "r", "categories": ["R"] }