# R for travis: see documentation at https://docs.travis-ci.com/user/languages/r

language: r

sudo: required

dist: trusty

warnings_are_errors: true

r:
  - release
  - devel

# r_build_args: --no-build-vignettes

os:
  - linux
  - osx

matrix:
  exclude:
    - os: osx
      r: devel

env:
  global:
    - _R_CHECK_FORCE_SUGGESTS_=FALSE

# install:
#   - R -e "install.packages('remotes'); suppressWarnings(remotes::install_deps(dependencies = TRUE))"
#   - R -e "install.packages(c('covr', 'rmarkdown', 'testthat'))"


addons:
  apt:
    packages:
      - r-cran-rglpk

after_success:
  - if [ "$TRAVIS_OS_NAME" == "linux" ]; then Rscript -e 'covr::codecov()'; fi;

notifications:
  email:
    on_success: change
    on_failure: change
