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
15
15
BugReports
16
16
bXj
17
17
cancelling
18
- cff
19
18
ci
20
19
cli
21
20
CMD
@@ -29,15 +28,13 @@ counterpair
29
28
coventions
30
29
cpp
31
30
cre
32
- ctb
33
31
cyclocomp
34
32
cynkra
35
33
dec
36
34
dependabot
37
35
desc
38
36
devtools
39
37
dir
40
- docsearch
41
38
dont
42
39
dontrun
43
40
dontshow
@@ -102,7 +99,6 @@ linters
102
99
lintr
103
100
lorenz
104
101
lorenzwalthert
105
- macOS
106
102
magrittr
107
103
mav
108
104
md
You can’t perform that action at this time.
0 commit comments