Skip to content

Commit 454edd2

Browse files
committed
try a cleaner approach now that dockerfile has R as an entrypoint
1 parent 1c452ae commit 454edd2

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed

.travis.yml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,17 @@ cache: packages
33
sudo: true
44
dist: trusty
55
warnings_are_errors: false
6-
r:
7-
- oldrel
8-
- release
9-
- devel
6+
7+
matrix:
8+
include:
9+
- r:
10+
- devel
11+
- oldrel
12+
- release
13+
# run visual tests
14+
# TODO: push the svg files somewhere on after_failure?
15+
before_script: docker run -e VMODE="ci" -v $(pwd):/home/plotly --privileged cpsievert/plotly-orca
16+
1017

1118
env:
1219
global:
@@ -25,11 +32,6 @@ before_install:
2532
- sudo apt-get install --yes libudunits2-dev libproj-dev libgeos-dev libgdal-dev
2633
# make sure R pkgs are upt-to-date
2734
- Rscript -e 'update.packages(ask = FALSE)'
28-
29-
# run visual tests on r-release
30-
before_script:
31-
- if [[ "$TRAVIS_R_VERSION_STRING" == "release" ]]; then docker run -v $(pwd):/home/plotly -it --privileged cpsievert/plotly-orca bash; fi
32-
- if [[ "$TRAVIS_R_VERSION_STRING" == "release" ]]; then R -e "res <- devtools::test('/home/plotly', reporter='summary'); df <- as.data.frame(res); if (sum(df$failed) > 0 || any(df$error)) q(status=1)"; fi
33-
- if [[ "$TRAVIS_R_VERSION_STRING" == "release" ]]; then exit; fi
35+
3436
# work around temporary travis + R 3.5 bug
3537
r_packages: devtools

inst/docker/Dockerfile.vtest

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ EXPOSE 3838
9797
# note the workaround to get docker to run a proper exit status when there are testthat errors
9898
# https://github.com/r-lib/testthat/issues/515#issuecomment-304169376
9999

100-
CMD R -e "devtools::install_deps('/home/plotly', dep = T); \
100+
ENTRYPOINT R -e "devtools::install_deps('/home/plotly', dep = T); \
101101
if (!identical(Sys.getenv('VMODE'), 'ci')) vdiffr::manage_cases('/home/plotly'); \
102102
res <- devtools::test('/home/plotly', reporter='summary'); \
103103
df <- as.data.frame(res); \

0 commit comments

Comments
 (0)