Skip to content

Commit ce377b5

Browse files
committed
Define a location for pak during the R CMD check phase.
1 parent 017d4b5 commit ce377b5

File tree

5 files changed

+9
-6
lines changed

5 files changed

+9
-6
lines changed

DESCRIPTION

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ BugReports: https://github.com/coatless-rpkg/dockitect/issues
1717
License: AGPL (>= 3)
1818
Depends: R (>= 4.4)
1919
Imports:
20-
utils,
2120
cli,
2221
pak,
2322
jsonlite

tests/testthat/setup.R

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# c.f. https://github.com/r-lib/pkgcache/tree/main?tab=readme-ov-file#using-pkgcache-in-cran-packages
2+
3+
# Temporary directory for R package cache
4+
# Workaround until going full toward renv
5+
Sys.setenv(R_USER_CACHE_DIR = tempfile())

tests/testthat/test-dockitect-from-environment.R

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ test_that("dk_from_session(): creates dockerfile from current session", {
2121
test_that("dk_add_sysreqs(): adds system requirements correctly", {
2222
# Skip if 'pak' not available
2323
skip_if_not_installed("pak")
24-
skip_on_ci()
2524

2625
# Mock functions for testing to avoid long loading times ----
2726
mock_pkg_sysreqs <- function(packages, sysreqs_platform = "ubuntu") {

tests/testthat/test-dockitect-templates.R

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ test_that("dk_register_template(): registers and retrieves custom templates", {
2626
# Test dk_template_base() ----
2727
test_that("dk_template_base(): creates a base R dockerfile", {
2828

29-
skip_on_ci()
30-
3129
df <- dk_template_base(r_version = "4.4.0")
3230
expect_true(is_dockerfile(df))
3331
expect_true(has_instruction(df, "FROM"))
@@ -49,7 +47,7 @@ test_that("dk_template_base(): creates a base R dockerfile", {
4947

5048
# Test dk_template_shiny() ----
5149
test_that("dk_template_shiny(): creates a Shiny app dockerfile", {
52-
skip_on_ci()
50+
5351
df <- dk_template_shiny(r_version = "4.4.0", port = 3838)
5452
expect_true(is_dockerfile(df))
5553
expect_true(has_instruction(df, "FROM"))
@@ -74,7 +72,7 @@ test_that("dk_template_shiny(): creates a Shiny app dockerfile", {
7472

7573
# Test dk_template_plumber() ----
7674
test_that("dk_template_plumber(): creates a Plumber API dockerfile", {
77-
skip_on_ci()
75+
7876
df <- dk_template_plumber(r_version = "4.4.0", port = 8000, api_file = "plumber.R")
7977
expect_true(is_dockerfile(df))
8078
expect_true(has_instruction(df, "FROM"))

vignettes/getting-started-with-dockitect.Rmd

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ knitr::opts_chunk$set(
1212
collapse = TRUE,
1313
comment = "#>"
1414
)
15+
16+
Sys.setenv(R_USER_CACHE_DIR = tempfile())
1517
```
1618

1719
## Introduction

0 commit comments

Comments
 (0)