From 59bd625c529d54fe956a633a4916b75aeda6e84b Mon Sep 17 00:00:00 2001 From: Jim Thorson Date: Thu, 16 Jan 2025 14:00:26 -0800 Subject: [PATCH] another attempt --- tests/testthat/test-covariates_against_glm.R | 5 ++++- tests/testthat/test-single-species-examples.R | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/testthat/test-covariates_against_glm.R b/tests/testthat/test-covariates_against_glm.R index d971583..9ca4a96 100644 --- a/tests/testthat/test-covariates_against_glm.R +++ b/tests/testthat/test-covariates_against_glm.R @@ -20,7 +20,10 @@ test_that("Density covariates give identical results to glm(.) ", { # Previously worked with CI, but not anymore #skip_on_ci() skip_if(skip_local) - if(!require(INLA)) install.packages("INLA",repos=c(getOption("repos"),INLA="https://inla.r-inla-download.org/R/stable"), dep=TRUE) + if(!require("INLA")){ + install.packages("INLA", dep=TRUE, repos=c( CRAN="https://cloud.r-project.org", + INLA="https://inla.r-inla-download.org/R/stable") ) + } # load data set example = load_example( data_set="covariate_example" ) diff --git a/tests/testthat/test-single-species-examples.R b/tests/testthat/test-single-species-examples.R index 31c35fb..7098b70 100644 --- a/tests/testthat/test-single-species-examples.R +++ b/tests/testthat/test-single-species-examples.R @@ -20,7 +20,10 @@ test_that("Eastern Bering Sea pollock is working ", { # Previously worked with CI, but not anymore #skip_on_ci() skip_if(skip_local) - if(!require(INLA)) install.packages("INLA",repos=c(getOption("repos"),INLA="https://inla.r-inla-download.org/R/stable"), dep=TRUE) + if(!require("INLA")){ + install.packages("INLA", dep=TRUE, repos=c( CRAN="https://cloud.r-project.org", + INLA="https://inla.r-inla-download.org/R/stable") ) + } # Prepping test_path = file.path(singlespecies_example_path,"EBS_pollock")