-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.travis.yml
44 lines (37 loc) · 1.64 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
#This YML file is to be used specificially for the Rdistance package. Other packages will require different YML file contents.
#Use R language
language: r
sudo: true
cache: packages
warnings_are_errors: false
env:
global:
- R_BUILD_ARGS="--no-build-vignettes --no-manual"
- R_CHECK_ARGS="--no-build-vignettes --no-manual --timings" #don't build the vignettes or manual
- _R_CHECK_TIMINGS_="0" #Allows for timing information for the examples of all functions
- CODECOV_TOKEN="2276dc8f-432e-40d2-a344-a79570156f7d" #test token to ensure this service actually works
r:
- release #build and test for stable release version only, devel can also be optionally used.
#install external dependencies, however, there are none for this package
install:
- R -e 'install.packages("devtools")'
- R -e 'devtools::install_deps(dependencies = TRUE)'
#This will catch installation issues
- R -e 'devtools::install_github("tmcd82070/Rdistance")'
- R -e 'install.packages("graphics")'
- R -e 'install.packages("stats")'
- R -e 'install.packages("utils")'
- R -e 'install.packages("covr")' #specifically for codecovr feature
- R -e 'install.packages("Distance")'
#Avoid building vignettes, they take too much time and will often time out the Travis CI
script:
- R CMD build --no-build-vignettes --no-manual .
- R CMD check --no-build-vignettes --no-manual --timings *tar.gz
- Rscript -e 'devtools::install();devtools::test(stop_on_failure = TRUE)'
#report coverage for release version
after_success:
- test $TRAVIS_R_VERSION_STRING = 'release' && Rscript -e 'covr::codecov()'
notifications:
email:
on_success: change
on_failure: change