language: r
cache: packages
sudo: false

r:
  - 3.4.4
  - release

r_packages:
  - devtools
  - dplyr
  - oro.dicom
  - oro.nifti
  - doSNOW
  - rapportools
  - foreach
  - R6
  - parallel
  - stringr
  - covr

r_github_packages:
  - OHDSI/DatabaseConnector
  - OHDSI/SqlRender

notifications:
  email:
    on_success: change
    on_failure: change

before_script:
  - wget -P ~ $CT_SAMPLE
  - mkdir ~/signedrangeimages
  - tar -xvf ~/signedrangeimages.tar.bz2 -C ~/signedrangeimages

script:
  - cd ./archives/radETL
  - R CMD build .
  - Rscript -e "devtools::install_git('.')"

after_success:
  - Rscript tests/testRadETL.R
  - cat /tmp/radiologyDB.log
  - Rscript -e 'library(covr); codecov()'
