language: r
cache: packages

env:
 global:
   - CRAN: http://cran.rstudio.com

r_packages:
  - testthat
  - nlme
  - lme4
  - arm
  - coda
  - MASS

warnings_are_errors: true

script: 
  - "cd .."
  - "R CMD build rr"
  - "R CMD INSTALL rr_*.tar.gz"
  - "R CMD check rr_*.tar.gz"
  - "cd rr/tests"
  - "Rscript testthat.R"

notifications:
  email:
    on_success: change
    on_failure: change
