From 6bbb40118b19162c7396e0beb5c4fc42cd8dd96f Mon Sep 17 00:00:00 2001 From: cpsievert Date: Mon, 18 Jan 2016 12:40:01 -0600 Subject: [PATCH 1/7] go back to bootstrapping R --- .travis.yml | 45 ++++++++++++++++++--------------------------- 1 file changed, 18 insertions(+), 27 deletions(-) diff --git a/.travis.yml b/.travis.yml index da60340111..ad85eade22 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,39 +1,30 @@ language: c -sudo: false -addons: - apt: - sources: - - r-packages-precise - packages: - - r-base-dev - - r-recommended - - qpdf - -env: - - NOT_CRAN=true R_LIBS_USER=~/R/library - global: - # plotly_api_key (for posting to plot.ly) - - secure: "UAETDsmeXkXm9eUpZa3JTm8/cv+jyLmArXE0TQD0yQNICFNPkGeNergoQmkesRqG+ifLu6V1lPXu1XlqQPdXY60clUHThDN+AjsBmcv9F170k6RtBSV8pIKL9fsW8t0v/maEet86qOSf3cNa5+gK8GjBH1pmLrN2rF9r7RhwUdg=" - # GITHUB_PAT (for pushing to plotly-test-table) - - secure: "LHJONgWOo+98vNeFLI7LSJU3RtbMVszlI79GB8CcXmc2mlgM/UtZ5b6RnkNlhmg3Gj1/uObfm/rIybVTwuS1yNpeKv73+gsZOYhobVXiUGVxdRFG/mg5mbqwyWkkuofjPGFlMZCEMgHim37eZzgjSibwVH1LClRDsCoFMCgvgV0=" +before_install: + - curl -OL http://raw.github.com/craigcitro/r-travis/master/scripts/travis-tool.sh + - chmod 755 ./travis-tool.sh + - ./travis-tool.sh bootstrap + # password is encrypted below + - echo "Sys.setenv('plotly_username' = 'RTestBot3000')" > ~/.Rprofile -cache: - directories: - $R_LIBS_USER +install: + - ./travis-tool.sh install_deps before_script: - - mkdir -p "$R_LIBS_USER" - - echo "Sys.setenv('plotly_username' = 'RTestBot3000')" > ~/.Rprofile + - git config --global user.name "cpsievert" + - git config --global user.email "cpsievert1@gmail.com" - git clone https://github.com/cpsievert/plotly-test-table.git ../plotly-test-table - - "wget -q -O - https://github.com/yihui/crandalf/raw/master/inst/scripts/install-pandoc | bash" - - Rscript -e 'if (length(find.package("devtools", quiet = TRUE)) == 0L) { install.packages("devtools", repos = "http://cran.rstudio.com") }' - - Rscript -e 'library(devtools);update_packages("devtools", repos = "http://cran.rstudio.com")' - - Rscript -e 'library(devtools);install_deps(repos = "http://cran.rstudio.com", dependencies = TRUE)' script: - - Rscript -e 'devtools::install(); source("tests/testthat.R", chdir = T)' + - Rscript -e "devtools::install(); source('tests/testthat.R', chdir = TRUE)" after_success: - cd ../plotly-test-table - Rscript ../plotly/inst/build-push-comment.R + +env: + global: + # plotly_api_key (for posting to plot.ly) + - secure: "UAETDsmeXkXm9eUpZa3JTm8/cv+jyLmArXE0TQD0yQNICFNPkGeNergoQmkesRqG+ifLu6V1lPXu1XlqQPdXY60clUHThDN+AjsBmcv9F170k6RtBSV8pIKL9fsW8t0v/maEet86qOSf3cNa5+gK8GjBH1pmLrN2rF9r7RhwUdg=" + # GITHUB_PAT (for pushing to plotly-test-table) + - secure: "LHJONgWOo+98vNeFLI7LSJU3RtbMVszlI79GB8CcXmc2mlgM/UtZ5b6RnkNlhmg3Gj1/uObfm/rIybVTwuS1yNpeKv73+gsZOYhobVXiUGVxdRFG/mg5mbqwyWkkuofjPGFlMZCEMgHim37eZzgjSibwVH1LClRDsCoFMCgvgV0=" From 8e14bad25d4b881e91e3ecc93f36acce6520725d Mon Sep 17 00:00:00 2001 From: cpsievert Date: Mon, 18 Jan 2016 12:48:19 -0600 Subject: [PATCH 2/7] fix test --- tests/testthat/test-ggplot-bar.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/testthat/test-ggplot-bar.R b/tests/testthat/test-ggplot-bar.R index a9e4866909..be35586afc 100644 --- a/tests/testthat/test-ggplot-bar.R +++ b/tests/testthat/test-ggplot-bar.R @@ -188,7 +188,7 @@ test_that("For a given x value, if multiple y exist, sum them. ", { p <- ggplot(mtcars, aes(factor(cyl))) + geom_bar() + coord_flip() test_that("geom_bar() + coord_flip() works", { - info <- expect_traces(g, 1, "coord-flip") + info <- expect_traces(p, 1, "coord-flip") expect_identical(info$data[[1]]$orientation, "h") }) From cac79ba39823b80dff10c06c3f36af2912e31cb6 Mon Sep 17 00:00:00 2001 From: cpsievert Date: Mon, 18 Jan 2016 12:52:28 -0600 Subject: [PATCH 3/7] lets try caching again --- .travis.yml | 49 +++++++++++++++++++++++++++++++------------------ 1 file changed, 31 insertions(+), 18 deletions(-) diff --git a/.travis.yml b/.travis.yml index ad85eade22..77e191728d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,30 +1,43 @@ language: c +sudo: false -before_install: - - curl -OL http://raw.github.com/craigcitro/r-travis/master/scripts/travis-tool.sh - - chmod 755 ./travis-tool.sh - - ./travis-tool.sh bootstrap - # password is encrypted below - - echo "Sys.setenv('plotly_username' = 'RTestBot3000')" > ~/.Rprofile +addons: + apt: + sources: + - r-packages-precise + packages: + - r-base-dev + - r-recommended + - qpdf + +env: + - R_LIBS_USER=~/R/library NOT_CRAN=true -install: - - ./travis-tool.sh install_deps +cache: + directories: + $R_LIBS_USER + global: + # plotly_api_key (for posting to plot.ly) + - secure: "UAETDsmeXkXm9eUpZa3JTm8/cv+jyLmArXE0TQD0yQNICFNPkGeNergoQmkesRqG+ifLu6V1lPXu1XlqQPdXY60clUHThDN+AjsBmcv9F170k6RtBSV8pIKL9fsW8t0v/maEet86qOSf3cNa5+gK8GjBH1pmLrN2rF9r7RhwUdg=" + # GITHUB_PAT (for pushing to plotly-test-table) + - secure: "LHJONgWOo+98vNeFLI7LSJU3RtbMVszlI79GB8CcXmc2mlgM/UtZ5b6RnkNlhmg3Gj1/uObfm/rIybVTwuS1yNpeKv73+gsZOYhobVXiUGVxdRFG/mg5mbqwyWkkuofjPGFlMZCEMgHim37eZzgjSibwVH1LClRDsCoFMCgvgV0=" before_script: - - git config --global user.name "cpsievert" - - git config --global user.email "cpsievert1@gmail.com" + - mkdir -p "$R_LIBS_USER" + - echo "Sys.setenv('plotly_username' = 'RTestBot3000')" > ~/.Rprofile - git clone https://github.com/cpsievert/plotly-test-table.git ../plotly-test-table + - "wget -q -O - https://github.com/yihui/crandalf/raw/master/inst/scripts/install-pandoc | bash" + - Rscript -e 'if (length(find.package("devtools", quiet = TRUE)) == 0L) { install.packages("devtools", repos = "http://cran.rstudio.com") }' + - Rscript -e 'library(devtools);update_packages("devtools", repos = "http://cran.rstudio.com")' + - Rscript -e 'library(devtools);install_deps(repos = "http://cran.rstudio.com", dependencies = TRUE)' + # for debugging + - Rscript -e 'devtools::install()' + - Rscript -e 'plotly:::verify("username")' + - Rscript -e 'plotly:::verify("api_key")' script: - - Rscript -e "devtools::install(); source('tests/testthat.R', chdir = TRUE)" + - Rscript -e 'devtools::check()' after_success: - cd ../plotly-test-table - Rscript ../plotly/inst/build-push-comment.R - -env: - global: - # plotly_api_key (for posting to plot.ly) - - secure: "UAETDsmeXkXm9eUpZa3JTm8/cv+jyLmArXE0TQD0yQNICFNPkGeNergoQmkesRqG+ifLu6V1lPXu1XlqQPdXY60clUHThDN+AjsBmcv9F170k6RtBSV8pIKL9fsW8t0v/maEet86qOSf3cNa5+gK8GjBH1pmLrN2rF9r7RhwUdg=" - # GITHUB_PAT (for pushing to plotly-test-table) - - secure: "LHJONgWOo+98vNeFLI7LSJU3RtbMVszlI79GB8CcXmc2mlgM/UtZ5b6RnkNlhmg3Gj1/uObfm/rIybVTwuS1yNpeKv73+gsZOYhobVXiUGVxdRFG/mg5mbqwyWkkuofjPGFlMZCEMgHim37eZzgjSibwVH1LClRDsCoFMCgvgV0=" From 7baf7c9efe6f4772978fbebf809c54c3251bb960 Mon Sep 17 00:00:00 2001 From: cpsievert Date: Mon, 18 Jan 2016 13:06:39 -0600 Subject: [PATCH 4/7] fix env var location --- .travis.yml | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index 77e191728d..c802ee1984 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,17 +11,17 @@ addons: - qpdf env: - - R_LIBS_USER=~/R/library NOT_CRAN=true - -cache: - directories: - $R_LIBS_USER global: + - R_LIBS_USER=~/R/library NOT_CRAN=true # plotly_api_key (for posting to plot.ly) - secure: "UAETDsmeXkXm9eUpZa3JTm8/cv+jyLmArXE0TQD0yQNICFNPkGeNergoQmkesRqG+ifLu6V1lPXu1XlqQPdXY60clUHThDN+AjsBmcv9F170k6RtBSV8pIKL9fsW8t0v/maEet86qOSf3cNa5+gK8GjBH1pmLrN2rF9r7RhwUdg=" # GITHUB_PAT (for pushing to plotly-test-table) - secure: "LHJONgWOo+98vNeFLI7LSJU3RtbMVszlI79GB8CcXmc2mlgM/UtZ5b6RnkNlhmg3Gj1/uObfm/rIybVTwuS1yNpeKv73+gsZOYhobVXiUGVxdRFG/mg5mbqwyWkkuofjPGFlMZCEMgHim37eZzgjSibwVH1LClRDsCoFMCgvgV0=" +cache: + directories: + $R_LIBS_USER + before_script: - mkdir -p "$R_LIBS_USER" - echo "Sys.setenv('plotly_username' = 'RTestBot3000')" > ~/.Rprofile @@ -30,10 +30,6 @@ before_script: - Rscript -e 'if (length(find.package("devtools", quiet = TRUE)) == 0L) { install.packages("devtools", repos = "http://cran.rstudio.com") }' - Rscript -e 'library(devtools);update_packages("devtools", repos = "http://cran.rstudio.com")' - Rscript -e 'library(devtools);install_deps(repos = "http://cran.rstudio.com", dependencies = TRUE)' - # for debugging - - Rscript -e 'devtools::install()' - - Rscript -e 'plotly:::verify("username")' - - Rscript -e 'plotly:::verify("api_key")' script: - Rscript -e 'devtools::check()' From 07270a3fa4c4e48efb69a8ee6a67f73f9a4f81ed Mon Sep 17 00:00:00 2001 From: cpsievert Date: Mon, 18 Jan 2016 13:19:31 -0600 Subject: [PATCH 5/7] run R CMD check on non-pull request builds --- .travis.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index c802ee1984..b0c10d1db1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -32,7 +32,10 @@ before_script: - Rscript -e 'library(devtools);install_deps(repos = "http://cran.rstudio.com", dependencies = TRUE)' script: - - Rscript -e 'devtools::check()' + # run R CMD check on the non-pull request build + - sh -c "if [ '$TRAVIS_PULL_REQUEST' = 'false' ]; then Rscript -e 'devtools::check()'" + # we do some fancy stuff on the pull request build that confuses R CMD check + - sh -c "if [ '$TRAVIS_PULL_REQUEST' != 'false' ]; then Rscript -e 'devtools::install(); source(\"tests/testhat.R\", chdir = T)'" after_success: - cd ../plotly-test-table From 082c235515178e4002334539f4fd4e33e3a78c7f Mon Sep 17 00:00:00 2001 From: cpsievert Date: Mon, 18 Jan 2016 13:21:46 -0600 Subject: [PATCH 6/7] fi --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index b0c10d1db1..b177fd48b4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -33,9 +33,9 @@ before_script: script: # run R CMD check on the non-pull request build - - sh -c "if [ '$TRAVIS_PULL_REQUEST' = 'false' ]; then Rscript -e 'devtools::check()'" + - sh -c "if [ '$TRAVIS_PULL_REQUEST' = 'false' ]; then Rscript -e 'devtools::check()'; fi" # we do some fancy stuff on the pull request build that confuses R CMD check - - sh -c "if [ '$TRAVIS_PULL_REQUEST' != 'false' ]; then Rscript -e 'devtools::install(); source(\"tests/testhat.R\", chdir = T)'" + - sh -c "if [ '$TRAVIS_PULL_REQUEST' != 'false' ]; then Rscript -e 'devtools::install(); source(\"tests/testhat.R\", chdir = T)'; fi" after_success: - cd ../plotly-test-table From 1e9f6134739eb35caef1a01f3d8a5cc05458e4c2 Mon Sep 17 00:00:00 2001 From: cpsievert Date: Mon, 18 Jan 2016 13:27:19 -0600 Subject: [PATCH 7/7] fix typo --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index b177fd48b4..607eea7548 100644 --- a/.travis.yml +++ b/.travis.yml @@ -35,7 +35,7 @@ script: # run R CMD check on the non-pull request build - sh -c "if [ '$TRAVIS_PULL_REQUEST' = 'false' ]; then Rscript -e 'devtools::check()'; fi" # we do some fancy stuff on the pull request build that confuses R CMD check - - sh -c "if [ '$TRAVIS_PULL_REQUEST' != 'false' ]; then Rscript -e 'devtools::install(); source(\"tests/testhat.R\", chdir = T)'; fi" + - sh -c "if [ '$TRAVIS_PULL_REQUEST' != 'false' ]; then Rscript -e 'devtools::install(); source(\"tests/testthat.R\", chdir = T)'; fi" after_success: - cd ../plotly-test-table