Skip to content

Commit

Permalink
restore skip_on_ci()
Browse files Browse the repository at this point in the history
  • Loading branch information
JanMarvin committed Oct 1, 2023
1 parent 4b382f4 commit 0bd3ee5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
6 changes: 5 additions & 1 deletion tests/testthat/helper.R
Original file line number Diff line number Diff line change
Expand Up @@ -1001,9 +1001,13 @@ testfile_path <- function(x, replace = FALSE) {

fl <- testthat::test_path("testfiles", x)

if (Sys.getenv("openxlsx2_testthat_fullrun") == "") {
if (isTRUE(as.logical(Sys.getenv("CI", "false")))) # on_ci()
return(testthat::skip("Skip on CI"))
}

# try to download
if (!file.exists(fl) || replace) {
# relies on libcurl and was optional in R < 4.2.0 on Windows
out <- paste0(test_path, "/", x)
url <- paste0("https://github.com/JanMarvin/openxlsx-data/raw/main/", x)
try({
Expand Down
10 changes: 6 additions & 4 deletions tests/testthat/test-aaa.R
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
test_that("testsetup", {

options("openxlsx2.datetimeCreated" = as.POSIXct("2023-07-20 23:32:14"))
options("openxlsx2.datetimeCreated" = as.POSIXct("2023-07-20 23:32:14", tz = "UTC"))

if (Sys.getenv("openxlsx2_testthat_fullrun") == "") {
skip_on_ci()
}
wb <- wb_workbook()

exp <- "2023-07-20T23:32:14Z"
got <- wb$get_properties()[["datetime_created"]]
expect_equal(exp, got)

})

0 comments on commit 0bd3ee5

Please sign in to comment.