Skip to content

Put testthat back in the CI dependency lists - #5

Merged
elkronos merged 1 commit into
mainfrom
ci-testthat
Aug 21, 2026
Merged

Put testthat back in the CI dependency lists#5
elkronos merged 1 commit into
mainfrom
ci-testthat

Conversation

@elkronos

Copy link
Copy Markdown
Owner

Restricting the matrix and backends jobs to hard dependencies dropped testthat along with the rest of Suggests. tests/testthat.R opens with library(testthat), so the test stage errored instead of skipping.

R_CHECK_FORCE_SUGGESTS = false does not cover this. It downgrades check's complaint about absent Suggests to an INFO line; it does not stop R CMD check from running the test file. The r-devel log listed testthat among

Packages suggested but not available for checking:
  'sp', 'GWmodel', 'ranger', 'brms', 'cmdstanr', 'loo', 'geometry',
  'gstat', 'patchwork', 'FNN', 'testthat'

and everything else on that list really is optional: no test file uses one outside skip_if_not_installed(), and no example that actually runs -- i.e. outside \dontrun{} -- uses one outside requireNamespace(). testthat was the single entry that has to be installed for the check to proceed.

The vignette half of the previous commit was correct; that run reported "creating vignettes ... OK", so knitr, rmarkdown and ggplot2 sufficed. It also came in at 16m47s against the earlier 30m35s, so dropping the Stan toolchain did what it was meant to.

Claude-Session: https://claude.ai/code/session_014DkVoswUXWntSsYAJsxgPw

Restricting the matrix and backends jobs to hard dependencies dropped
testthat along with the rest of Suggests. tests/testthat.R opens with
library(testthat), so the test stage errored instead of skipping.

_R_CHECK_FORCE_SUGGESTS_ = false does not cover this. It downgrades check's
complaint about absent Suggests to an INFO line; it does not stop R CMD check
from running the test file. The r-devel log listed testthat among

    Packages suggested but not available for checking:
      'sp', 'GWmodel', 'ranger', 'brms', 'cmdstanr', 'loo', 'geometry',
      'gstat', 'patchwork', 'FNN', 'testthat'

and everything else on that list really is optional: no test file uses one
outside skip_if_not_installed(), and no example that actually runs -- i.e.
outside \dontrun{} -- uses one outside requireNamespace(). testthat was the
single entry that has to be installed for the check to proceed.

The vignette half of the previous commit was correct; that run reported
"creating vignettes ... OK", so knitr, rmarkdown and ggplot2 sufficed. It also
came in at 16m47s against the earlier 30m35s, so dropping the Stan toolchain
did what it was meant to.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014DkVoswUXWntSsYAJsxgPw
@elkronos
elkronos merged commit ba96d08 into main Aug 21, 2026
6 checks passed
@elkronos
elkronos deleted the ci-testthat branch August 21, 2026 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant