Skip to content

Commit 72b6636

Browse files
committed
Merge pull request #407 from ropensci/fix/travis
Fix travis build recipe
2 parents 8f11a8d + 1e9f613 commit 72b6636

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

.travis.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ addons:
1111
- qpdf
1212

1313
env:
14-
- NOT_CRAN=true R_LIBS_USER=~/R/library
1514
global:
15+
- R_LIBS_USER=~/R/library NOT_CRAN=true
1616
# plotly_api_key (for posting to plot.ly)
1717
- secure: "UAETDsmeXkXm9eUpZa3JTm8/cv+jyLmArXE0TQD0yQNICFNPkGeNergoQmkesRqG+ifLu6V1lPXu1XlqQPdXY60clUHThDN+AjsBmcv9F170k6RtBSV8pIKL9fsW8t0v/maEet86qOSf3cNa5+gK8GjBH1pmLrN2rF9r7RhwUdg="
1818
# GITHUB_PAT (for pushing to plotly-test-table)
@@ -32,7 +32,10 @@ before_script:
3232
- Rscript -e 'library(devtools);install_deps(repos = "http://cran.rstudio.com", dependencies = TRUE)'
3333

3434
script:
35-
- Rscript -e 'devtools::install(); source("tests/testthat.R", chdir = T)'
35+
# run R CMD check on the non-pull request build
36+
- sh -c "if [ '$TRAVIS_PULL_REQUEST' = 'false' ]; then Rscript -e 'devtools::check()'; fi"
37+
# we do some fancy stuff on the pull request build that confuses R CMD check
38+
- sh -c "if [ '$TRAVIS_PULL_REQUEST' != 'false' ]; then Rscript -e 'devtools::install(); source(\"tests/testthat.R\", chdir = T)'; fi"
3639

3740
after_success:
3841
- cd ../plotly-test-table

tests/testthat/test-ggplot-bar.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ test_that("For a given x value, if multiple y exist, sum them. ", {
188188
p <- ggplot(mtcars, aes(factor(cyl))) + geom_bar() + coord_flip()
189189

190190
test_that("geom_bar() + coord_flip() works", {
191-
info <- expect_traces(g, 1, "coord-flip")
191+
info <- expect_traces(p, 1, "coord-flip")
192192
expect_identical(info$data[[1]]$orientation, "h")
193193
})
194194

0 commit comments

Comments
 (0)