Skip to content

Commit 0c65598

Browse files
author
Max Moldovan
committed
fix(ci): skip greta tests on CI before the usability probe
The greta usability probe (tensorflow::tf_version() in skip_if_greta_backend_unusable) is called before skipping. On Windows CI that probe triggers reticulate's uv-based auto-provisioning -- a large TensorFlow download that fails the job -- whereas on Linux/macOS it returns FALSE and the test skips cleanly. This made windows-latest R-CMD-check flaky (greta's Python stack is intentionally absent on CI). Skip on CI before probing so the download is never triggered.
1 parent f441486 commit 0c65598

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

tests/testthat/helper-greta.R

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,13 @@
3535
# both installed and usable. Use this everywhere a test fits through greta.
3636
skip_if_greta_backend_unusable <- function() {
3737
testthat::skip_if_not_installed("greta")
38+
# greta's Python / TensorFlow stack is intentionally absent on the CI matrix.
39+
# Skip on CI *before* the usability probe: on Windows, calling
40+
# `tensorflow::tf_version()` triggers reticulate's uv-based auto-provisioning
41+
# (a large, slow TensorFlow download) that fails the job non-deterministically
42+
# rather than returning FALSE the way it does on Linux / macOS. Skipping first
43+
# keeps the probe -- and the download -- off CI entirely.
44+
testthat::skip_on_ci()
3845
if (!.fb_greta_usable()) {
3946
testthat::skip("greta backend unusable (Python / TensorFlow stack unavailable)")
4047
}

0 commit comments

Comments
 (0)