@@ -12,7 +12,8 @@ if (report_diffs || build_table) {
12
12
message(" Spinning up an independent R session with plotly's master branch installed" )
13
13
Rserve :: Rserve(args = " --vanilla --RS-enable-remote" )
14
14
conn <- RSconnect()
15
- # master version should _always_ depend on the CRAN version of ggplot2
15
+ # we don't make assumptions about ggplot2 versioning,
16
+ # but it is _strongly_ recommended to use the CRAN version (of ggplot2)
16
17
RSeval(conn , " devtools::install_github('ropensci/plotly')" )
17
18
RSeval(conn , " library(plotly)" )
18
19
if (report_diffs ) {
@@ -23,6 +24,18 @@ if (report_diffs || build_table) {
23
24
master_hash <- substr(master_hash , 1 , 7 )
24
25
# plotly-test-table repo hosts the diff pages & keeps track of previous versions
25
26
table_dir <- normalizePath(" ../../plotly-test-table" , mustWork = T )
27
+ # Make sure we have appropriate versions of plotlyjs
28
+ # (see plotly-test-table/template/template/index.html)
29
+ file.copy(
30
+ file.path(" .." , " inst" , " htmlwidgets" , " lib" , " plotlyjs" , " plotly-latest.min.js" ),
31
+ file.path(table_dir , " template" , " New.min.js" ),
32
+ overwrite = TRUE
33
+ )
34
+ download.file(
35
+ " https://raw.githubusercontent.com/ropensci/plotly/master/inst/htmlwidgets/lib/plotlyjs/plotly-latest.min.js" ,
36
+ file.path(table_dir , " template" , " Old.min.js" )
37
+ )
38
+ # directory for placing test differences
26
39
this_dir <- file.path(table_dir , this_hash )
27
40
if (dir.exists(this_dir )) {
28
41
message(" Tests were already run on this commit. Nuking the old results..." )
@@ -102,7 +115,7 @@ save_outputs <- function(gg, name) {
102
115
dir.create(test_dir , recursive = T )
103
116
# copy over diffing template
104
117
file.copy(
105
- file.path(table_dir , " template" , " template " , " index.html" ),
118
+ file.path(table_dir , " template" , " index.html" ),
106
119
test_dir ,
107
120
recursive = T
108
121
)
0 commit comments