Skip to content

Commit 4417798

Browse files
committed
update GHA
1 parent 4eb46b5 commit 4417798

File tree

5 files changed

+71
-14
lines changed

5 files changed

+71
-14
lines changed
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
2+
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
3+
#
4+
# NOTE: This workflow only directly installs "hard" dependencies, i.e. Depends,
5+
# Imports, and LinkingTo dependencies. Notably, Suggests dependencies are never
6+
# installed, with the exception of testthat, knitr, and rmarkdown. The cache is
7+
# never used to avoid accidentally restoring a cache containing a suggested
8+
# dependency.
9+
on:
10+
push:
11+
branches: [main, master]
12+
pull_request:
13+
14+
name: R-CMD-check-hard.yaml
15+
16+
permissions: read-all
17+
18+
jobs:
19+
check-no-suggests:
20+
runs-on: ${{ matrix.config.os }}
21+
22+
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
23+
24+
strategy:
25+
fail-fast: false
26+
matrix:
27+
config:
28+
- {os: ubuntu-latest, r: 'release'}
29+
30+
env:
31+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
32+
R_KEEP_PKG_SOURCE: yes
33+
CXX14: g++
34+
CXX14STD: -std=c++1y
35+
CXX14FLAGS: -Wall -g -02
36+
37+
steps:
38+
- uses: actions/checkout@v4
39+
40+
- uses: r-lib/actions/setup-pandoc@v2
41+
42+
- uses: r-lib/actions/setup-r@v2
43+
with:
44+
r-version: ${{ matrix.config.r }}
45+
http-user-agent: ${{ matrix.config.http-user-agent }}
46+
use-public-rspm: true
47+
48+
- uses: r-lib/actions/setup-r-dependencies@v2
49+
with:
50+
dependencies: '"hard"'
51+
cache: false
52+
extra-packages: |
53+
any::rcmdcheck
54+
any::testthat
55+
any::knitr
56+
any::rmarkdown
57+
needs: check
58+
59+
- uses: r-lib/actions/check-r-package@v2
60+
with:
61+
upload-snapshots: true
62+
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'

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

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ on:
88
push:
99
branches: [main, master]
1010
pull_request:
11-
branches: [main, master]
12-
workflow_dispatch:
1311

1412
name: R-CMD-check.yaml
1513

@@ -36,7 +34,7 @@ jobs:
3634
- {os: ubuntu-latest, r: 'oldrel-1'}
3735
- {os: ubuntu-latest, r: 'oldrel-2'}
3836
- {os: ubuntu-latest, r: 'oldrel-3'}
39-
#- {os: ubuntu-latest, r: 'oldrel-4'}
37+
- {os: ubuntu-latest, r: 'oldrel-4'}
4038

4139
env:
4240
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
@@ -80,8 +78,4 @@ jobs:
8078
- uses: r-lib/actions/check-r-package@v2
8179
with:
8280
upload-snapshots: true
83-
84-
- name: Show testthat output
85-
if: always()
86-
run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true
87-
shell: bash
81+
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'

.github/workflows/pkgdown.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ on:
44
push:
55
branches: [main, master]
66
pull_request:
7-
branches: [main, master]
87
release:
98
types: [published]
109
workflow_dispatch:

.github/workflows/test-coverage.yaml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ on:
44
push:
55
branches: [main, master]
66
pull_request:
7-
branches: [main, master]
87

98
name: test-coverage.yaml
109

@@ -51,14 +50,16 @@ jobs:
5150
clean = FALSE,
5251
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package")
5352
)
53+
print(cov)
5454
covr::to_cobertura(cov)
5555
shell: Rscript {0}
5656

57-
- uses: codecov/codecov-action@v4
57+
- uses: codecov/codecov-action@v5
5858
with:
59-
fail_ci_if_error: ${{ github.event_name != 'pull_request' && true || false }}
60-
file: ./cobertura.xml
61-
plugin: noop
59+
# Fail if error if not on PR, or if on PR and token is given
60+
fail_ci_if_error: ${{ github.event_name != 'pull_request' || secrets.CODECOV_TOKEN }}
61+
files: ./cobertura.xml
62+
plugins: noop
6263
disable_search: true
6364
token: ${{ secrets.CODECOV_TOKEN }}
6465

README.Rmd

Lines changed: 1 addition & 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](https://cranlogs.r-pkg.org/badges/parsnip)](https://CRAN.R-project.org/package=parsnip)
2323
[![lifecycle](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html)
24+
[![Codecov test coverage](https://codecov.io/gh/tidymodels/parsnip/graph/badge.svg)](https://app.codecov.io/gh/tidymodels/parsnip)
2425
<!-- badges: end -->
2526

2627
## Introduction

0 commit comments

Comments
 (0)