language: r
sudo: false
latex: true
cache: packages
r:
  - oldrel
  - release
  - devel

git:
  submodules: false

warnings_are_errors: true
env:
  global:
    - _R_CHECK_CRAN_INCOMING_=FALSE
    - secure: wAD2PyxJ8IdG4c4kh2fBbwaK8W8JTkAoVsK3ehH4yzUS5qYtctWhczmru34iWt+NxKzZGYqLyg7OPU0hPwgn8OUexUzHc7Yamms++5UObHklwkDqGfJXX+xKHv3AmgRwfjaBulWusNn7q6swn0Bl4j0dDiyD1o7Mz1VYtVUOOaU=

r_github_packages:
  - r-lib/covr
  - RcppCore/Rcpp

after_success:
  - test $TRAVIS_R_VERSION_STRING = "devel" && Rscript -e 'covr::codecov()'

jobs:
  include:
    - stage: downstream
      if: branch = master AND type = push AND fork = false
      install: skip
      script: |
        curl -LO --retry 3 https://raw.githubusercontent.com/r-simmer/trigger-travis/master/trigger-travis.sh
        sh trigger-travis.sh r-simmer simmer.plot $TRAVIS_ACCESS_TOKEN
        sh trigger-travis.sh r-simmer simmer.bricks $TRAVIS_ACCESS_TOKEN
