Skip to content

Commit a46ca92

Browse files
committed
updated GHA
1 parent 50aa106 commit a46ca92

File tree

5 files changed

+23
-18
lines changed

5 files changed

+23
-18
lines changed

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

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ jobs:
1515
fail-fast: false
1616
matrix:
1717
config:
18-
- {os: macOS-latest, r: 'devel'}
1918
- {os: macOS-latest, r: 'release'}
2019
- {os: windows-latest, r: 'release'}
2120
- {os: windows-latest, r: '3.6'}
21+
- {os: ubuntu-16.04, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
2222
- {os: ubuntu-16.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
2323
- {os: ubuntu-16.04, r: 'oldrel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
2424
- {os: ubuntu-16.04, r: '3.5', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
@@ -54,12 +54,11 @@ jobs:
5454

5555
- name: Install system dependencies
5656
if: runner.os == 'Linux'
57-
env:
58-
RHUB_PLATFORM: linux-x86_64-ubuntu-gcc
5957
run: |
60-
Rscript -e "remotes::install_github('r-hub/sysreqs')"
61-
sysreqs=$(Rscript -e "cat(sysreqs::sysreq_commands('DESCRIPTION'))")
62-
sudo -s eval "$sysreqs"
58+
while read -r cmd
59+
do
60+
eval sudo $cmd
61+
done < <(Rscript -e 'cat(remotes::system_requirements("ubuntu", "16.04"), sep = "\n")')
6362
6463
- name: Install dependencies
6564
run: |
@@ -102,7 +101,7 @@ jobs:
102101

103102
- name: Upload check results
104103
if: failure()
105-
uses: actions/upload-artifact@master
104+
uses: actions/upload-artifact@main
106105
with:
107106
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
108107
path: check

.github/workflows/pkgdown.yaml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,15 @@ jobs:
3232

3333
- name: Install dependencies
3434
run: |
35-
install.packages("remotes")
3635
remotes::install_deps(dependencies = TRUE)
37-
remotes::install_dev("pkgdown")
38-
remotes::install_github("tidyverse/tidytemplate")
39-
remotes::install_cran("tidymodels")
40-
remotes::install_cran("C50")
41-
remotes::install_cran("modeldata")
36+
install.packages("pkgdown")
4237
shell: Rscript {0}
4338

4439
- name: Install package
4540
run: R CMD INSTALL .
4641

4742
- name: Deploy package
48-
run: pkgdown::deploy_to_branch(new_process = FALSE)
49-
shell: Rscript {0}
43+
run: |
44+
git config --local user.email "actions@github.com"
45+
git config --local user.name "GitHub Actions"
46+
Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)'

.github/workflows/pr-commands.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ jobs:
2121
run: Rscript -e 'roxygen2::roxygenise()'
2222
- name: commit
2323
run: |
24+
git config --local user.email "actions@github.com"
25+
git config --local user.name "GitHub Actions"
2426
git add man/\* NAMESPACE
2527
git commit -m 'Document'
2628
- uses: r-lib/actions/pr-push@master
@@ -44,6 +46,8 @@ jobs:
4446
run: Rscript -e 'styler::style_pkg()'
4547
- name: commit
4648
run: |
49+
git config --local user.email "actions@github.com"
50+
git config --local user.name "GitHub Actions"
4751
git add \*.R
4852
git commit -m 'Style'
4953
- uses: r-lib/actions/pr-push@master

README.Rmd

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ knitr::opts_chunk$set(
2121
[![CRAN status](https://www.r-pkg.org/badges/version/parsnip)](https://CRAN.R-project.org/package=parsnip)
2222
[![Downloads](http://cranlogs.r-pkg.org/badges/parsnip)](https://cran.rstudio.com/package=parsnip)
2323
[![lifecycle](https://img.shields.io/badge/lifecycle-maturing-blue.svg)](https://www.tidyverse.org/lifecycle/#maturing)
24+
[![R build status](https://github.com/tidymodels/parsnip/workflows/R-CMD-check/badge.svg)](https://github.com/tidymodels/parsnip/actions)
2425
<!-- badges: end -->
2526

2627
## Introduction
@@ -112,6 +113,7 @@ rand_forest(mtry = 10, trees = 2000) %>%
112113
Either one of these model specifications can be fit in the same way:
113114

114115
```{r}
116+
set.seed(192)
115117
rand_forest(mtry = 10, trees = 2000) %>%
116118
set_engine("ranger", importance = "impurity") %>%
117119
set_mode("regression") %>%

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ status](https://codecov.io/gh/tidymodels/parsnip/branch/master/graph/badge.svg)]
1313
status](https://www.r-pkg.org/badges/version/parsnip)](https://CRAN.R-project.org/package=parsnip)
1414
[![Downloads](http://cranlogs.r-pkg.org/badges/parsnip)](https://cran.rstudio.com/package=parsnip)
1515
[![lifecycle](https://img.shields.io/badge/lifecycle-maturing-blue.svg)](https://www.tidyverse.org/lifecycle/#maturing)
16+
[![R build
17+
status](https://github.com/tidymodels/parsnip/workflows/R-CMD-check/badge.svg)](https://github.com/tidymodels/parsnip/actions)
1618
<!-- badges: end -->
1719

1820
## Introduction
@@ -134,13 +136,14 @@ rand_forest(mtry = 10, trees = 2000) %>%
134136
Either one of these model specifications can be fit in the same way:
135137

136138
``` r
139+
set.seed(192)
137140
rand_forest(mtry = 10, trees = 2000) %>%
138141
set_engine("ranger", importance = "impurity") %>%
139142
set_mode("regression") %>%
140143
fit(mpg ~ ., data = mtcars)
141144
#> parsnip model object
142145
#>
143-
#> Fit time: 71ms
146+
#> Fit time: 69ms
144147
#> Ranger result
145148
#>
146149
#> Call:
@@ -154,8 +157,8 @@ rand_forest(mtry = 10, trees = 2000) %>%
154157
#> Target node size: 5
155158
#> Variable importance mode: impurity
156159
#> Splitrule: variance
157-
#> OOB prediction error (MSE): 5.699772
158-
#> R squared (OOB): 0.8430857
160+
#> OOB prediction error (MSE): 5.976917
161+
#> R squared (OOB): 0.8354559
159162
```
160163

161164
A list of all `parsnip` models across different CRAN packages can be

0 commit comments

Comments
 (0)