Skip to content

Commit

Permalink
feat: Use compute_codecov() in inflate() and inflate_all()
Browse files Browse the repository at this point in the history
  • Loading branch information
yohann committed Jun 17, 2024
1 parent 4a9be86 commit f29d4e2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 15 deletions.
10 changes: 1 addition & 9 deletions R/inflate.R
Original file line number Diff line number Diff line change
Expand Up @@ -368,15 +368,7 @@ inflate <- function(pkg = ".", flat_file,

if (codecov) {
cli::cli_alert_info("Computing code coverage - it might take some time")
on_windows <- grepl("windows", tolower(osVersion))
if (on_windows) {
# On windows, package_coverage() will fail
# if called right alfer a pkgload::load_all()
pkgload::unload(pkg)
}
print(
covr::package_coverage()
)
compute_codecov(pkg = pkg)
}

# Restart RStudio
Expand Down
4 changes: 1 addition & 3 deletions R/inflate_all.R
Original file line number Diff line number Diff line change
Expand Up @@ -207,9 +207,7 @@ inflate_all <- function(

if (codecov) {
cli::cli_alert_info("Computing code coverage - it might take some time")
print(
covr::package_coverage()
)
compute_codecov(pkg = pkg)
}

invisible(pkg)
Expand Down
4 changes: 1 addition & 3 deletions dev/flat_inflate_all.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,7 @@ inflate_all <- function(
if (codecov) {
cli::cli_alert_info("Computing code coverage - it might take some time")
print(
covr::package_coverage()
)
compute_codecov(pkg = pkg)
}
invisible(pkg)
Expand Down

0 comments on commit f29d4e2

Please sign in to comment.