Skip to content

Commit fcdcc37

Browse files
jemus42jyliuu
authored andcommitted
chore: update workflows & rerender README.Rmd
1 parent 99cb4f5 commit fcdcc37

File tree

6 files changed

+44
-31
lines changed

6 files changed

+44
-31
lines changed

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ on:
66
pull_request:
77
branches: [main, master]
88

9-
name: R-CMD-check
9+
name: R-CMD-check.yaml
10+
11+
permissions: read-all
1012

1113
jobs:
1214
R-CMD-check:
@@ -29,7 +31,7 @@ jobs:
2931
R_KEEP_PKG_SOURCE: yes
3032

3133
steps:
32-
- uses: actions/checkout@v3
34+
- uses: actions/checkout@v4
3335

3436
- uses: r-lib/actions/setup-pandoc@v2
3537

@@ -47,3 +49,4 @@ jobs:
4749
- uses: r-lib/actions/check-r-package@v2
4850
with:
4951
upload-snapshots: true
52+
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'

.github/workflows/pkgdown.yaml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ on:
99
types: [published]
1010
workflow_dispatch:
1111

12-
name: pkgdown
12+
name: pkgdown.yaml
13+
14+
permissions: read-all
1315

1416
jobs:
1517
pkgdown:
@@ -22,7 +24,7 @@ jobs:
2224
permissions:
2325
contents: write
2426
steps:
25-
- uses: actions/checkout@v3
27+
- uses: actions/checkout@v4
2628

2729
- uses: r-lib/actions/setup-pandoc@v2
2830

@@ -32,19 +34,16 @@ jobs:
3234

3335
- uses: r-lib/actions/setup-r-dependencies@v2
3436
with:
35-
cache-version: 2
3637
extra-packages: any::pkgdown, local::.
37-
needs: |
38-
website
39-
coverage
38+
needs: website
4039

4140
- name: Build site
4241
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
4342
shell: Rscript {0}
4443

4544
- name: Deploy to GitHub pages 🚀
4645
if: github.event_name != 'pull_request'
47-
uses: JamesIves/github-pages-deploy-action@v4.4.1
46+
uses: JamesIves/github-pages-deploy-action@v4.5.0
4847
with:
4948
clean: false
5049
branch: gh-pages

.github/workflows/test-coverage.yaml

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ on:
66
pull_request:
77
branches: [main, master]
88

9-
name: test-coverage
9+
name: test-coverage.yaml
10+
11+
permissions: read-all
1012

1113
jobs:
1214
test-coverage:
@@ -15,36 +17,45 @@ jobs:
1517
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
1618

1719
steps:
18-
- uses: actions/checkout@v3
20+
- uses: actions/checkout@v4
1921

2022
- uses: r-lib/actions/setup-r@v2
2123
with:
2224
use-public-rspm: true
2325

2426
- uses: r-lib/actions/setup-r-dependencies@v2
2527
with:
26-
extra-packages: any::covr
28+
extra-packages: any::covr, any::xml2
2729
needs: coverage
2830

2931
- name: Test coverage
3032
run: |
31-
covr::codecov(
33+
cov <- covr::package_coverage(
3234
quiet = FALSE,
3335
clean = FALSE,
34-
install_path = file.path(Sys.getenv("RUNNER_TEMP"), "package")
36+
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package")
3537
)
38+
covr::to_cobertura(cov)
3639
shell: Rscript {0}
3740

41+
- uses: codecov/codecov-action@v4
42+
with:
43+
fail_ci_if_error: ${{ github.event_name != 'pull_request' && true || false }}
44+
file: ./cobertura.xml
45+
plugin: noop
46+
disable_search: true
47+
token: ${{ secrets.CODECOV_TOKEN }}
48+
3849
- name: Show testthat output
3950
if: always()
4051
run: |
4152
## --------------------------------------------------------------------
42-
find ${{ runner.temp }}/package -name 'testthat.Rout*' -exec cat '{}' \; || true
53+
find '${{ runner.temp }}/package' -name 'testthat.Rout*' -exec cat '{}' \; || true
4354
shell: bash
4455

4556
- name: Upload test results
4657
if: failure()
47-
uses: actions/upload-artifact@v3
58+
uses: actions/upload-artifact@v4
4859
with:
4960
name: coverage-test-failures
5061
path: ${{ runner.temp }}/package

README.Rmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ set.seed(1)
2121

2222
<!-- badges: start -->
2323
[![R-CMD-check](https://github.com/PlantedML/randomPlantedForest/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/PlantedML/randomPlantedForest/actions/workflows/R-CMD-check.yaml)
24-
[![Codecov test coverage](https://codecov.io/gh/PlantedML/randomPlantedForest/branch/master/graph/badge.svg)](https://app.codecov.io/gh/PlantedML/randomPlantedForest?branch=master)
24+
[![Codecov test coverage](https://codecov.io/gh/PlantedML/randomPlantedForest/graph/badge.svg)](https://app.codecov.io/gh/PlantedML/randomPlantedForest)
2525
[![randomPlantedForest status badge](https://plantedml.r-universe.dev/badges/randomPlantedForest)](https://plantedml.r-universe.dev/randomPlantedForest)
2626
<!-- badges: end -->
2727

README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
[![R-CMD-check](https://github.com/PlantedML/randomPlantedForest/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/PlantedML/randomPlantedForest/actions/workflows/R-CMD-check.yaml)
99
[![Codecov test
10-
coverage](https://codecov.io/gh/PlantedML/randomPlantedForest/branch/master/graph/badge.svg)](https://app.codecov.io/gh/PlantedML/randomPlantedForest?branch=master)
10+
coverage](https://codecov.io/gh/PlantedML/randomPlantedForest/graph/badge.svg)](https://app.codecov.io/gh/PlantedML/randomPlantedForest)
1111
[![randomPlantedForest status
1212
badge](https://plantedml.r-universe.dev/badges/randomPlantedForest)](https://plantedml.r-universe.dev/randomPlantedForest)
1313
<!-- badges: end -->
@@ -66,12 +66,12 @@ predict(rpfit, new_data = mtcars) |>
6666
cbind(mpg = mtcars$mpg) |>
6767
head()
6868
#> .pred mpg
69-
#> 1 20.81459 21.0
70-
#> 2 20.72354 21.0
71-
#> 3 26.04526 22.8
72-
#> 4 21.26845 21.4
73-
#> 5 18.45921 18.7
74-
#> 6 19.54406 18.1
69+
#> 1 20.96451 21.0
70+
#> 2 21.06539 21.0
71+
#> 3 23.24140 22.8
72+
#> 4 21.17155 21.4
73+
#> 5 18.22740 18.7
74+
#> 6 18.76736 18.1
7575
```
7676

7777
Prediction components can be accessed via `predict_components`,
@@ -86,14 +86,14 @@ components <- predict_components(rpfit, new_data = mtcars)
8686
str(components)
8787
#> List of 3
8888
#> $ m :Classes 'data.table' and 'data.frame': 32 obs. of 6 variables:
89-
#> ..$ cyl : num [1:32] 0.445 0.445 0.863 0.445 -1.274 ...
90-
#> ..$ wt : num [1:32] -0.0615 -0.1421 2.3182 -0.0155 -0.3116 ...
91-
#> ..$ hp : num [1:32] 0.162 0.162 2.021 0.162 -0.941 ...
92-
#> ..$ cyl:wt: num [1:32] 0.00389 0.00389 0.69586 0.17156 0.4615 ...
93-
#> ..$ cyl:hp: num [1:32] 0.1453 0.1453 -0.0511 0.1453 0.1179 ...
94-
#> ..$ hp:wt : num [1:32] -0.1264 -0.1367 -0.0487 0.1138 0.1596 ...
89+
#> ..$ cyl : num [1:32] 0.224 0.224 0.873 0.224 -0.803 ...
90+
#> ..$ wt : num [1:32] 0.177 -0.102 1.229 -0.154 -0.863 ...
91+
#> ..$ hp : num [1:32] 1.253 1.253 1.559 1.253 -0.586 ...
92+
#> ..$ cyl:wt: num [1:32] -0.0516 0.0326 -0.0978 0.0279 0.1207 ...
93+
#> ..$ cyl:hp: num [1:32] -0.0549 -0.0549 0.1872 -0.0549 0.3816 ...
94+
#> ..$ hp:wt : num [1:32] -0.5891 -0.2933 -0.5148 -0.1305 -0.0282 ...
9595
#> ..- attr(*, ".internal.selfref")=<externalptr>
96-
#> $ intercept: num 20.2
96+
#> $ intercept: num 20
9797
#> $ x :Classes 'data.table' and 'data.frame': 32 obs. of 3 variables:
9898
#> ..$ cyl: Factor w/ 3 levels "4","6","8": 2 2 1 2 3 2 3 1 1 2 ...
9999
#> ..$ wt : num [1:32] 2.62 2.88 2.32 3.21 3.44 ...
-3.39 KB
Loading

0 commit comments

Comments
 (0)