language: r
cache: packages
sudo: required
dist: trusty
latex: false
fortran: false

services:
  - docker

env:
  global:
    - NOT_CRAN=true
    - _R_CHECK_FORCE_SUGGESTS_=false
  matrix:
  include:
    - dist: trusty
      r_check_args: '--ignore-vignettes'
      r_build_args: '--no-build-vignettes'

addons:
   apt:
     update: true
     sources:
       - sourceline: 'ppa:opencpu/imagemagick'
       - sourceline: 'ppa:ubuntugis/ppa'
     packages:
       - libmagick++-dev
       - librsvg2-dev
       - libwebp-dev
       - libpoppler-cpp-dev
       - libtesseract-dev
       - libleptonica-dev
       - tesseract-ocr-eng
       - r-cran-rgdal
       - libfftw3-dev
       - cargo

bioc_packages:
  - EBImage

before_install:
  - docker pull scrapinghub/splash:3.2
  - docker run -p 5023:5023 -p 8050:8050 -p 8051:8051 -d scrapinghub/splash:3.2
  - docker ps -a
  - (while true; do echo 'Ping? Pong!'; sleep 500; done) &

r:
 - oldrel
 - release
 - devel

after_success:
  - Rscript -e 'covr::codecov()'