IndrajeetPatil/workflows/.github/workflows/check-extra.yaml (MIT) runs three R checks that nothing in this repo — or in rpt — currently does. They catch a class of bug R CMD check passes over.
1. Warnings as errors, across three surfaces
All under options(warn = 2L):
devtools::run_examples(fresh = TRUE, run_dontrun = TRUE, run_donttest = TRUE)
- a testthat sweep
- a vignette render loop over
fs::dir_ls("vignettes/", glob = "*.Rmd", recurse = TRUE)
A deprecation warning from a dependency is the motivating case: it is invisible in a normal green check until the deprecation becomes an error a release later.
Note the workaround upstream needed, since reimplementing it from scratch would hit the same wall: parallel testthat does not honor a global warn option (testthat#1912), so it finds test scripts and calls testthat::test_file() per file inside withr::local_options(list(warn = 2L)).
2. Random test order
testthat::test_dir("tests", shuffle = TRUE) with a randomly drawn seed that is logged, so a failure is reproducible. It also sets TESTTHAT_PARALLEL = "FALSE" via withr::local_envvar, since shuffling is meaningless if tests run in parallel anyway.
This catches inter-test dependence — a test that only passes because an earlier one left state behind. That failure mode stays hidden indefinitely under a fixed order and then surfaces as a mysterious CI failure when someone adds or reorders a test.
3. README render check
Renders README.Rmd with warnings as errors. rpt has a bespoke check-readme.yaml doing the freshness half of this (re-render, fail if README.md changed), so this is partly covered there and worth reconciling rather than duplicating.
Design notes
- Upstream's 6-line header comment explains the deliberate redundancy of installing R separately in each of the three jobs: parallel jobs give each check its own status badge and surface all failures at once instead of short-circuiting at the first. Worth preserving that rationale (and the comment) if the structure is copied.
- Upstream's inline R uses
purrr, withr, fs, cli, and pkgload without listing them in extra-packages — they arrive transitively via devtools. That is fragile; declare them explicitly.
- The three checks are independent and could reasonably be three inputs on one workflow rather than one monolith.
Source: IndrajeetPatil/workflows, MIT.
IndrajeetPatil/workflows/.github/workflows/check-extra.yaml(MIT) runs three R checks that nothing in this repo — or inrpt— currently does. They catch a class of bugR CMD checkpasses over.1. Warnings as errors, across three surfaces
All under
options(warn = 2L):devtools::run_examples(fresh = TRUE, run_dontrun = TRUE, run_donttest = TRUE)fs::dir_ls("vignettes/", glob = "*.Rmd", recurse = TRUE)A deprecation warning from a dependency is the motivating case: it is invisible in a normal green check until the deprecation becomes an error a release later.
Note the workaround upstream needed, since reimplementing it from scratch would hit the same wall: parallel testthat does not honor a global
warnoption (testthat#1912), so it finds test scripts and callstestthat::test_file()per file insidewithr::local_options(list(warn = 2L)).2. Random test order
testthat::test_dir("tests", shuffle = TRUE)with a randomly drawn seed that is logged, so a failure is reproducible. It also setsTESTTHAT_PARALLEL = "FALSE"viawithr::local_envvar, since shuffling is meaningless if tests run in parallel anyway.This catches inter-test dependence — a test that only passes because an earlier one left state behind. That failure mode stays hidden indefinitely under a fixed order and then surfaces as a mysterious CI failure when someone adds or reorders a test.
3. README render check
Renders
README.Rmdwith warnings as errors.rpthas a bespokecheck-readme.yamldoing the freshness half of this (re-render, fail ifREADME.mdchanged), so this is partly covered there and worth reconciling rather than duplicating.Design notes
purrr,withr,fs,cli, andpkgloadwithout listing them inextra-packages— they arrive transitively viadevtools. That is fragile; declare them explicitly.Source:
IndrajeetPatil/workflows, MIT.