File tree Expand file tree Collapse file tree 3 files changed +48
-46
lines changed Expand file tree Collapse file tree 3 files changed +48
-46
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ # execute all examples and tests with warnings turned into errors to look for new warnings
2+ on :
3+ push :
4+ branches : [main, master]
5+ pull_request :
6+ branches : [main, master]
7+
8+ name : check-no-warnings
9+
10+ jobs :
11+ check-no-warnings :
12+ runs-on : ubuntu-latest
13+ env :
14+ GITHUB_PAT : ${{ secrets.GITHUB_TOKEN }}
15+
16+ steps :
17+ - uses : actions/checkout@v4
18+
19+ - uses : r-lib/actions/setup-r@v2
20+ with :
21+ use-public-rspm : true
22+
23+ - uses : r-lib/actions/setup-r-dependencies@v2
24+ with :
25+ pak-version : devel
26+ extra-packages : |
27+ any::devtools
28+ local::.
29+
30+ - name : Run examples
31+ run : |
32+ options(crayon.enabled = TRUE, warn = 2L)
33+ devtools::run_examples(fresh = TRUE, run_dontrun = TRUE, run_donttest = TRUE)
34+ shell : Rscript {0}
35+
36+ - name : Run Tests
37+ run : |
38+ options(crayon.enabled = TRUE)
39+ pkgload::load_all()
40+ # this workaround needed to play nicely with parallel testing
41+ # see: https://github.com/r-lib/testthat/issues/1912
42+ test_script_paths <- testthat::find_test_scripts("tests/testthat")
43+ test_with_warning_as_error <- function(path) {
44+ withr::local_options(list(warn = 2L))
45+ testthat::test_file(path, stop_on_failure = TRUE, stop_on_warning = TRUE)
46+ }
47+ purrr::walk(test_script_paths, test_with_warning_as_error)
48+ shell : Rscript {0}
Original file line number Diff line number Diff line change @@ -15,7 +15,6 @@ bootswatch
1515BugReports
1616bXj
1717cancelling
18- cff
1918ci
2019cli
2120CMD
@@ -29,15 +28,13 @@ counterpair
2928coventions
3029cpp
3130cre
32- ctb
3331cyclocomp
3432cynkra
3533dec
3634dependabot
3735desc
3836devtools
3937dir
40- docsearch
4138dont
4239dontrun
4340dontshow
@@ -102,7 +99,6 @@ linters
10299lintr
103100lorenz
104101lorenzwalthert
105- macOS
106102magrittr
107103mav
108104md
You can’t perform that action at this time.
0 commit comments