From 73497723fa30d9c1493150866e1a0e8d435e96dc Mon Sep 17 00:00:00 2001 From: Franciszek Walkowiak Date: Thu, 16 May 2024 15:13:04 +0200 Subject: [PATCH 1/5] Update --- .github/workflows/build-check-install.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-check-install.yaml b/.github/workflows/build-check-install.yaml index 04ed446e0..861bf9ef2 100644 --- a/.github/workflows/build-check-install.yaml +++ b/.github/workflows/build-check-install.yaml @@ -381,7 +381,10 @@ jobs: names(content) <- unlist(lapply(tmp, function(x) x[1])) return(content) } - devtools::install_dev_deps(".", repos = split_to_map("${{ inputs.install-deps-from-package-repositories }}")) + pak::repo_add(split_to_map("${{ inputs.install-deps-from-package-repositories }}") + cat("Currently configured pak repositories:\n") + pak::repo_get() + pak::local_install_dev_deps(root = ".", upgrade = FALSE) shell: Rscript {0} working-directory: ${{ github.event.repository.name }}/${{ inputs.package-subdirectory }} From 2ffa3b5307e9173535fb385ee5fffbe01b394a4a Mon Sep 17 00:00:00 2001 From: Franciszek Walkowiak Date: Thu, 16 May 2024 15:19:13 +0200 Subject: [PATCH 2/5] Update --- .github/workflows/build-check-install.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build-check-install.yaml b/.github/workflows/build-check-install.yaml index 861bf9ef2..e049bff48 100644 --- a/.github/workflows/build-check-install.yaml +++ b/.github/workflows/build-check-install.yaml @@ -203,7 +203,6 @@ jobs: runs-on: ubuntu-latest if: > !contains(github.event.commits[0].message, '[skip r-cmd]') - && github.event.pull_request.draft == false container: image: ${{ matrix.config.image }}:${{ matrix.config.tag }} outputs: From 5ab0bc50872674fbcf19e0590cc0a5a4402c6fc6 Mon Sep 17 00:00:00 2001 From: Franciszek Walkowiak Date: Thu, 16 May 2024 15:23:09 +0200 Subject: [PATCH 3/5] Update --- .github/workflows/build-check-install.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-check-install.yaml b/.github/workflows/build-check-install.yaml index e049bff48..4f92a810f 100644 --- a/.github/workflows/build-check-install.yaml +++ b/.github/workflows/build-check-install.yaml @@ -380,7 +380,7 @@ jobs: names(content) <- unlist(lapply(tmp, function(x) x[1])) return(content) } - pak::repo_add(split_to_map("${{ inputs.install-deps-from-package-repositories }}") + pak::repo_add(split_to_map("${{ inputs.install-deps-from-package-repositories }}")) cat("Currently configured pak repositories:\n") pak::repo_get() pak::local_install_dev_deps(root = ".", upgrade = FALSE) From 55a44c9981fea7febcc04c886d47e1db0435952f Mon Sep 17 00:00:00 2001 From: Franciszek Walkowiak Date: Thu, 16 May 2024 15:26:12 +0200 Subject: [PATCH 4/5] Update --- .github/workflows/build-check-install.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build-check-install.yaml b/.github/workflows/build-check-install.yaml index 4f92a810f..426d9457b 100644 --- a/.github/workflows/build-check-install.yaml +++ b/.github/workflows/build-check-install.yaml @@ -380,6 +380,7 @@ jobs: names(content) <- unlist(lapply(tmp, function(x) x[1])) return(content) } + if (!require("pak")) install.packages("pak", upgrade = "never") pak::repo_add(split_to_map("${{ inputs.install-deps-from-package-repositories }}")) cat("Currently configured pak repositories:\n") pak::repo_get() From bd04b236bef80af9aea1bfd4f68a26d1bf2e922f Mon Sep 17 00:00:00 2001 From: Franciszek Walkowiak Date: Thu, 16 May 2024 17:12:04 +0200 Subject: [PATCH 5/5] Update --- .github/workflows/build-check-install.yaml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-check-install.yaml b/.github/workflows/build-check-install.yaml index 426d9457b..061c4bac3 100644 --- a/.github/workflows/build-check-install.yaml +++ b/.github/workflows/build-check-install.yaml @@ -374,14 +374,11 @@ jobs: - name: Install dependencies from package repositories 🗄️ if: inputs.install-deps-from-package-repositories != '' run: | - split_to_map <- function(args) { - tmp <- strsplit(x = unlist(strsplit(args, ",")), "=") - content <- unlist(lapply(tmp, function(x) x[2])) - names(content) <- unlist(lapply(tmp, function(x) x[1])) - return(content) - } if (!require("pak")) install.packages("pak", upgrade = "never") - pak::repo_add(split_to_map("${{ inputs.install-deps-from-package-repositories }}")) + package_repositories <- "${{ inputs.install-deps-from-package-repositories }}" + pairs <- strsplit(package_repositories, ",")[[1]] + urls <- sapply(strsplit(pairs, "="), `[`, 2) + lapply(urls, function(x){pak::repo_add(x)}) cat("Currently configured pak repositories:\n") pak::repo_get() pak::local_install_dev_deps(root = ".", upgrade = FALSE)