Skip to content

Commit 741ce17

Browse files
committed
cache update.packages() in vdiff container and avoid overwriting the internal i() function
1 parent 4622410 commit 741ce17

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

inst/docker/Dockerfile.vtest

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,12 +97,14 @@ EXPOSE 3838
9797
# http://r-sig-geo.2731867.n2.nabble.com/Re-Unexpected-configure-error-following-recent-rgeos-release-td7592423.html
9898
RUN R -e "install.packages('rgeos', repos='http://R-Forge.R-project.org', type='source')"
9999

100+
RUN R -e "update.packages(ask=FALSE)"
101+
100102
# install any new dependencies, then either manage cases (the default) or run tests
101103
# note the workaround to get docker to run a proper exit status when there are testthat errors
102104
# https://github.com/r-lib/testthat/issues/515#issuecomment-304169376
103105

104-
CMD R -e "devtools::install_deps('/home/plotly', dep = T); \
105-
if (!identical(Sys.getenv('VMODE'), 'ci')) vdiffr::manage_cases('/home/plotly'); \
106-
res <- devtools::test('/home/plotly', reporter='summary'); \
106+
CMD cd /home/plotly && R -e "devtools::install_deps(dep = T); \
107+
if (!identical(Sys.getenv('VMODE'), 'ci')) vdiffr::manage_cases(); \
108+
res <- devtools::test(reporter='summary'); \
107109
df <- as.data.frame(res); \
108110
if (sum(df\$failed) > 0 || any(df\$error)) q(status=1)"

tests/testthat/helper-vdiffr.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ message("Visual testing is ", if (!enable_vdiffr) "not ", "enabled.")
77
if (enable_vdiffr) {
88

99
# try 20 random ports
10-
for (i in 1:20) {
10+
for (vdiff_port_tries in 1:20) {
1111
port <- floor(runif(1, 3001, 8000))
1212
success <- tryFALSE({
1313
# init image server with webgl enabled

0 commit comments

Comments
 (0)