Skip to content

Commit

Permalink
Merge pull request #489 from carpentries/fix-renv-setup
Browse files Browse the repository at this point in the history
update CI renv setup to use explicit snapshots
  • Loading branch information
zkamvar authored Jul 11, 2023
2 parents 8030c16 + 61cc392 commit 4b2a219
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ on:
branches: [main, master]
schedule:
- cron: '0 0 * * 2'
workflow_dispatch:

name: R-CMD-check

Expand Down Expand Up @@ -101,6 +102,7 @@ jobs:
- name: "Prime {renv} Cache"
if: runner.os != 'Windows'
run: |
renv::settings$snapshot.type("explicit")
renv::init()
system('sudo rm -rf renv.lock renv .Rprofile')
system('git clean -fd -e .github')
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches: [main, master]
pull_request:
branches: [main, master]
workflow_dispatch:

name: test-coverage

Expand Down Expand Up @@ -68,6 +69,7 @@ jobs:
- name: Prime {renv} Cache
run: |
renv::settings$snapshot.type("explicit")
renv::init()
system('rm -rf renv .Rprofile')
system('git clean -fd -e .github')
Expand Down
6 changes: 1 addition & 5 deletions tests/testthat/test-manage_deps.R
Original file line number Diff line number Diff line change
Expand Up @@ -201,12 +201,8 @@ test_that("update_cache() will update old package versions", {
skip_if_offline()
skip_if(covr::in_covr())

withr::local_options(list("renv.verbose" = TRUE))

suppressMessages({
res <- update_cache(path = fs::path(lsn, "episodes"), prompt = FALSE, quiet = FALSE) %>%
expect_output("sessioninfo")
})
res <- update_cache(path = fs::path(lsn, "episodes"), prompt = FALSE, quiet = FALSE)
expect_true(
package_version(res$sessioninfo$Version) > package_version("1.1.0")
)
Expand Down

0 comments on commit 4b2a219

Please sign in to comment.