# R for travis: see documentation at https://docs.travis-ci.com/user/languages/r
# Helpful tutorial: http://jtleek.com/protocols/travis_bioc_devel/

language: r
r:
  - bioc-release
sudo: true
cache: packages
bioc_required: true
# bioc_use_devel: false
warnings_are_errors: false

r_check_args: '--ignore-vignettes --no-examples'

os:
  - linux
  - osx
osx_image: xcode12.4

r_binary_packages:
  - withr
  - knitr
  - crayon
  - roxygen2
  - testthat
  - bitops
  - DBI
  - getopt
  - rjson
  - tidyr
  - dplyr
  - rlang
  - corrplot
  - rmarkdown
  - knitr
  - lmerTest
  
bioc_packages:
  - BiocParallel
  - BiocStyle
  - bumphunter
  - GenomicRanges
  - IRanges
  - sesameData
  - IlluminaHumanMethylation450kanno.ilmn12.hg19
  - IlluminaHumanMethylationEPICanno.ilm10b4.hg19
  
script:
  - |
    travis_wait R CMD build .
    travis_wait 60 R CMD check coMethDMR*tar.gz

after_script:
  - ls -lah
  - FILE=$(ls -1t *.tar.gz | head -n 1)
  - Rscript -e "library(BiocCheck); BiocCheck(\"${FILE}\")

r_build_args:  --no-resave-data

notifications:
    email: true
    on_success: never # default: change
    on_failure: always # default: always