diff --git a/.travis.yml b/.travis.yml index da60340111..607eea7548 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,8 +11,8 @@ addons: - qpdf env: - - NOT_CRAN=true R_LIBS_USER=~/R/library 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) @@ -32,7 +32,10 @@ before_script: - Rscript -e 'library(devtools);install_deps(repos = "http://cran.rstudio.com", dependencies = TRUE)' script: - - Rscript -e 'devtools::install(); source("tests/testthat.R", chdir = T)' + # 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/testthat.R\", chdir = T)'; fi" after_success: - cd ../plotly-test-table 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") })