Running github actions on Ubuntu. The following works when tested locally on Ubuntu and Windows, but crashes github actions without continuation. Note: Same error with testthat::expect_error
.
test_that("expect_error works on gi actions", {
a = try(stop("Hallo, welt", call. = FALSE))
expect_s3_class(a, "try-error")
})
2022-03-13T09:11:03.3672781Z > library(testthat)
2022-03-13T09:11:03.3673367Z > #options(Ncpus = parallel::detectCores(logical = TRUE))
2022-03-13T09:11:03.3679743Z > options(Ncpus = 1)
2022-03-13T09:11:03.3680158Z > test_check("anomanor")
2022-03-13T09:11:03.3680591Z Loading required package: anomanor
2022-03-13T09:11:03.3718740Z ##[error]Error: R CMD check found ERRORs
2022-03-13T09:11:03.3731024Z Execution halted
2022-03-13T09:11:03.3768052Z Starting 1 test process
2022-03-13T09:11:03.3768291Z
2022-03-13T09:11:03.3768302Z
2022-03-13T09:11:03.3768377Z Error:
2022-03-13T09:11:03.3768852Z ! testthat subprocess exited in file `test_parse_markers2.R`
2022-03-13T09:11:03.3769595Z Caused by error:
2022-03-13T09:11:03.3770273Z ! R session crashed with exit code 2
2022-03-13T09:11:03.3770651Z Backtrace:
2022-03-13T09:11:03.3771110Z ▆
2022-03-13T09:11:03.3771642Z 1. └─testthat::test_check("anomanor")
2022-03-13T09:11:03.3772406Z 2. └─testthat::test_dir(...)
2022-03-13T09:11:03.3772960Z 3. └─testthat:::test_files(...)
2022-03-13T09:11:03.3773672Z 4. └─testthat:::test_files(...)
2022-03-13T09:11:03.3774198Z 5. ├─testthat::with_reporter(...)
2022-03-13T09:11:03.3774748Z 6. │ └─base::tryCatch(...)
2022-03-13T09:11:03.3775708Z 7. │ └─base tryCatchList(expr, classes, parentenv, handlers)
2022-03-13T09:11:03.3776448Z 8. │ └─base tryCatchOne(expr, names, parentenv, handlers[[1L]])
2022-03-13T09:11:03.3777114Z 9. │ └─base doTryCatch(return(expr), name, parentenv, handler)
2022-03-13T09:11:03.3777855Z 10. └─testthat:::parallel_event_loop_chunky(queue, reporters)
2022-03-13T09:11:03.3778434Z 11. └─queue$poll(Inf)
2022-03-13T09:11:03.3778906Z 12. └─base::lapply(...)
2022-03-13T09:11:03.3801002Z 13. └─testthat FUN(X[[i]], ...)
2022-03-13T09:11:03.3801511Z 14. └─private$handle_error(msg, i)
2022-03-13T09:11:03.3802035Z 15. └─rlang::abort(...)
2022-03-13T09:11:03.3802332Z Execution halted