Skip to content

Commit ba916f0

Browse files
committed
GH actions based on @dfalbel's work
1 parent 2fb4d35 commit ba916f0

File tree

3 files changed

+66
-4
lines changed

3 files changed

+66
-4
lines changed

.Rbuildignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@ derby.log
1313
^revdep$
1414
^README\.md$
1515
^issue_template.md$
16+
^\.github/workflows/R-CMD-check\.yaml$

.github/workflows/R-CMD-check.yaml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
on: [push, pull_request]
2+
3+
name: R-CMD-check
4+
5+
jobs:
6+
R-CMD-check:
7+
runs-on: ${{ matrix.config.os }}
8+
9+
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
10+
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
config:
15+
- { os: windows-latest, r: '3.6'}
16+
- { os: windows-latest, r: 'devel'}
17+
- { os: ubuntu-16.04, r: '3.5', cran: "https://demo.rstudiopm.com/all/__linux__/xenial/latest"}
18+
- { os: ubuntu-16.04, r: '3.6', cran: "https://demo.rstudiopm.com/all/__linux__/xenial/latest"}
19+
env:
20+
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
21+
PIP_NO_WARN_SCRIPT_LOCATION: false
22+
23+
steps:
24+
- uses: actions/checkout@v1
25+
26+
- uses: r-lib/actions/setup-r@master
27+
28+
- uses: r-lib/actions/setup-pandoc@master
29+
30+
- name: Cache R packages
31+
if: runner.os != 'Windows'
32+
uses: actions/cache@v1
33+
with:
34+
path: ${{ env.R_LIBS_USER }}
35+
key: ${{ runner.os }}-r-${{ matrix.config.r }}-${{ hashFiles('DESCRIPTION') }}
36+
37+
- name: Install system dependencies
38+
if: runner.os == 'Linux'
39+
env:
40+
RHUB_PLATFORM: linux-x86_64-ubuntu-gcc
41+
run: |
42+
Rscript -e "install.packages('remotes')" -e "remotes::install_github('r-hub/sysreqs')"
43+
sysreqs=$(Rscript -e "cat(sysreqs::sysreq_commands('DESCRIPTION'))")
44+
sudo -s eval "$sysreqs"
45+
- name: Install dependencies
46+
run: Rscript -e "install.packages('remotes')" -e "remotes::install_deps(dependencies = TRUE)" -e "remotes::install_cran('rcmdcheck')"
47+
48+
- name: Install TensorFlow
49+
run: |
50+
Rscript -e "remotes::install_github('rstudio/reticulate') # TODO remove when reticulate 1.14 is on CRAN"
51+
Rscript -e "reticulate::install_miniconda()"
52+
Rscript -e "reticulate::conda_create('r-reticulate', packages = 'python==3.6.9')"
53+
Rscript -e "tensorflow::install_tensorflow(version='1.14.0')"
54+
- name: Check
55+
run: Rscript -e "rcmdcheck::rcmdcheck(args = '--no-manual', error_on = 'warning', check_dir = 'check')"
56+
57+
- name: Upload check results
58+
if: failure()
59+
uses: actions/upload-artifact@master
60+
with:
61+
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
62+
path: check

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11

2-
[![Build
3-
Status](https://travis-ci.org/tidymodels/parsnip.svg?branch=master)](https://travis-ci.org/tidymodels/parsnip)
4-
[![Coverage
5-
status](https://codecov.io/gh/tidymodels/parsnip/branch/master/graph/badge.svg)](https://codecov.io/github/tidymodels/parsnip?branch=master)
2+
[![Build Status](https://travis-ci.org/tidymodels/parsnip.svg?branch=master)](https://travis-ci.org/tidymodels/parsnip)
3+
[![R build status](https://github.com/tidymodels/parsnip/workflows/R-CMD-check/badge.svg)](https://github.com/tidymodels/parsnip)
4+
[![Coverage status](https://codecov.io/gh/tidymodels/parsnip/branch/master/graph/badge.svg)](https://codecov.io/github/tidymodels/parsnip?branch=master)
65
[![CRAN\_Status\_Badge](http://www.r-pkg.org/badges/version/parsnip)](https://cran.rstudio.com/package=parsnip)
76
[![Downloads](http://cranlogs.r-pkg.org/badges/parsnip)](https://cran.rstudio.com/package=parsnip)
87
[![lifecycle](https://img.shields.io/badge/lifecycle-maturing-blue.svg)](https://www.tidyverse.org/lifecycle/#maturing)

0 commit comments

Comments
 (0)