1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-09 00:02:38 +02:00

(v1.6.0.9055) support codecov again

This commit is contained in:
2021-05-21 20:20:51 +02:00
parent fecc5d183c
commit b210f1327c
72 changed files with 203 additions and 216 deletions

View File

@ -27,19 +27,15 @@
if (identical(Sys.getenv("R_RUN_TINYTEST"), "true")) {
# env var 'R_LIBS_USER' got overwritten during 'R CMD check' in GitHub Actions, so:
.libPaths(c(Sys.getenv("R_LIBS_USER_GH_ACTIONS"), .libPaths()))
# helper function
pkg_is_available <- function(pkg, also_load = TRUE) {
if (also_load == TRUE) {
out <- suppressWarnings(require(pkg, character.only = TRUE, warn.conflicts = FALSE, quietly = TRUE))
} else {
out <- requireNamespace(pkg, quietly = TRUE)
}
isTRUE(out)
}
if (pkg_is_available("tinytest")) {
print("here")
if (AMR:::pkg_is_available("tinytest")) {
print("here2")
library(AMR)
out <- test_package("AMR", verbose = FALSE)
out <- test_package("AMR",
testdir = ifelse(AMR:::dir.exists("inst/tinytest"),
"inst/tinytest",
"tinytest"),
verbose = FALSE)
cat(attributes(out)$duration, "\n")
print(summary(out))
}