Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check cran folder of rspm #90

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions setup-lesson-deps/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ runs:
if (Sys.getenv("RSPM") == "") {
release <- system("lsb_release -c | awk '{print $2}'", intern = TRUE)
Sys.setenv("RSPM" =
paste0("https://packagemanager.posit.co/all/__linux__/", release, "/latest"))
paste0("https://packagemanager.posit.co/cran/__linux__/", release, "/latest"))
}
}
repos <- list(
Expand Down Expand Up @@ -78,7 +78,6 @@ runs:
Sys.setenv("RENV_PROFILE" = "lesson-requirements")
Sys.setenv("RSPM_ROOT" = "https://packagemanager.posit.co")
vise::lock2desc(renv::paths$lockfile(), desc = "${{ github.workspace }}/DESCRIPTION")
writeLines(readLines("${{ github.workspace }}/DESCRIPTION"))
vise::ci_sysreqs(renv::paths$lockfile(), execute = TRUE)
}

Expand All @@ -91,7 +90,7 @@ runs:
if (Sys.getenv("RSPM") == "") {
release <- system("lsb_release -c | awk '{print $2}'", intern = TRUE)
Sys.setenv("RSPM" =
paste0("https://packagemanager.posit.co/all/__linux__/", release, "/latest"))
paste0("https://packagemanager.posit.co/cran/__linux__/", release, "/latest"))
}
}
repos <- list(
Expand All @@ -107,7 +106,7 @@ runs:
cat("::endgroup::\n")

# Fortify local {renv} packages
cat("::group::Fortify local {renv} packages\n")
cat("::group::Fortify local {renv} packages (via DESCRIPTION)\n")
wd <- '${{ github.workspace }}'
req <- function(pkg) {
if (!requireNamespace(pkg, quietly = TRUE))
Expand All @@ -119,14 +118,16 @@ runs:
}
cat("::endgroup::\n")
if (file.exists(file.path(wd, 'renv'))) {
cat("::group::Fortify local {renv} packages\n")
cat("::group::Fortify local {renv} packages from lockfile\n")
if (file.exists("DESCRIPTION.bak")) {
file.rename("DESCRIPTION.bak", "DESCRIPTION")
} else {
try(file.remove("DESCRIPTION"), silent = TRUE)
}
req("renv")
Sys.setenv("RENV_PROFILE" = "lesson-requirements")
Sys.setenv("RSPM_ROOT" = "https://packagemanager.posit.co")
options(ppm.enabled = TRUE)
tryCatch(sandpaper::manage_deps(path = wd, quiet = FALSE),
error = function(e) {
iss <- "https://github.com/rstudio/renv/issues/1184"
Expand Down
Loading