-
Notifications
You must be signed in to change notification settings - Fork 19
/
.travis.yml
34 lines (31 loc) · 1.6 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
language: R
dist: trusty # ubuntu 14.04 has additional libraries available
sudo: required
cache: packages
before_cache:
- sudo rm -rf $HOME/R/Library/flip*
- sudo rm -rf $HOME/R/Library/rhtml*
warnings_are_errors: false
# install debian libraries to match R-servers
# update pre-installed packages to latest versions
before_install:
- sudo apt-get -qq update
- sudo apt-get install -y libgdal-dev libproj-dev python-protobuf libprotoc-dev libprotobuf-dev libv8-dev librsvg2-dev
script:
- R CMD build --no-manual --no-build-vignettes --no-resave-data .
- R CMD check --as-cran --no-manual --no-build-vignettes --no-tests *.tar.gz
- sudo Rscript -e 'install.packages("roxygen2")'
- if [ -d tests/testthat ]; then Rscript --default-packages='datasets,utils,grDevices,graphics,stats,methods' -e 'res<-devtools::test(); df <- as.data.frame(res); pass <- sum(df$failed)==0 && all(!df$error); write.csv(df, file="test_results.csv"); quit(status=1-pass, save="no")'; fi
notifications:
slack:
rooms:
- displayr:FTgSTNHC2rpanhJMGTKMwZXM#github-notifications
template:
- "Build <%{build_url}|#%{build_number}> %{result} in %{repository_name}@%{branch} by %{author}: <%{compare_url}|%{commit_message}>"
on_success: change
on_failure: always
# Warning notifications and downstream package builds are implemented
# by calling R functions so they can be updated in this package without
# committing a new change to .travis.yml in each repository
after_success: >-
Rscript -e "require(devtools); install_github('Displayr/travisCI'); travisCI::NotifyWarnings(); travisCI::TriggerDownstreamBuilds()"