forked from anhnguyendepocen/flipChoice
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
48 lines (42 loc) · 1.68 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
language: r
r:
- release
dist: trusty # ubuntu 14.04 has additional libraries available
sudo: required
cache: false
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
- rcode="res<-devtools::test(); "
- rcode+="df <- as.data.frame(res); "
- rcode+='pass <- sum(df$failed)==0 && all(!df$error); '
- rcode+="write.csv(df, file='test_results.csv'); "
- rcode+="quit(status=1-pass, save='no');"
r_packages:
- roxygen2
- covr
r_github_packages:
- Displayr/flipDevTools
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
- if [ -d tests/testthat ]; then
Rscript --default-packages='datasets,utils,grDevices,graphics,stats,methods' -e "$rcode";
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(flipDevTools); NotifyWarnings(); TriggerDownstreamBuilds()"
- travis_wait Rscript -e "flipDevTools::CheckCoverage()"