Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consolidate all "no warning" workflows in one #303

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 0 additions & 62 deletions .github/workflows/check-all-examples.yaml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Run tests with `options(warn = 2)` to fail on test warnings
# execute all examples, tests, and vignettes with warnings turned into errors
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]

name: check-test-warnings
name: check-no-warnings

jobs:
check-test-warnings:
check-no-warnings:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -18,25 +18,38 @@ jobs:

- uses: r-lib/actions/setup-r@v2
with:
r-version: "devel"
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
pak-version: devel
upgrade: 'TRUE'
extra-packages: |
any::devtools
local::.
needs: check

- name: Run examples
run: |
options(crayon.enabled = TRUE, warn = 2L)
devtools::run_examples(fresh = TRUE, run_dontrun = TRUE, run_donttest = TRUE)
shell: Rscript {0}

- name: Run Tests
run: |
options(crayon.enabled = TRUE)
pkgload::load_all()
# this workaround needed to play nicely with parallel testing
# see: https://github.com/r-lib/testthat/issues/1912
test_script_paths <- testthat::find_test_scripts("tests/testthat")
test_with_warning_as_error <- function(path) {
withr::local_options(list(warn = 2L))
testthat::test_file(path, stop_on_failure = TRUE, stop_on_warning = TRUE)
}
purrr::walk(test_script_paths, test_with_warning_as_error)
shell: Rscript {0}

- name: Build vignettes
run: |
options(crayon.enabled = TRUE, warn = 2L)
vignettes <- fs::dir_ls("vignettes/", glob = "*.Rmd", recurse = TRUE)
purrr::walk(vignettes, rmarkdown::render)
shell: Rscript {0}
50 changes: 0 additions & 50 deletions .github/workflows/check-vignette-warnings.yaml

This file was deleted.

Loading