forked from yihui/knitr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
36 lines (32 loc) · 1.16 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
# it is not really python, but there is no R support on Travis CI yet
language: python
# environment variables
env:
global:
- R_LIBS_USER=~/R
matrix:
- TARGET=travis
- TARGET=integration DISPLAY=:99.0
# capturing state, early exit if no integration test is needed
before_install:
- env | sort
- if [ ${TARGET} = integration ]; then
if ! make integration-need; then
echo "NOTE:"" Integration test skipped. To enable, create a branch named ${TRAVIS_BRANCH} in ${TRAVIS_REPO_SLUG}-examples.";
exit 0;
fi;
fi
# install dependencies
install:
- sudo apt-add-repository -y "deb http://cran.rstudio.com/bin/linux/ubuntu `lsb_release -cs`/"
- sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9
- sudo apt-add-repository -y ppa:marutter/c2d4u
- sudo apt-get update
- sudo apt-get install r-base-dev r-cran-xml r-cran-rcurl r-cran-rgl r-recommended
- "[ ! -d ${R_LIBS_USER} ] && mkdir ${R_LIBS_USER}"
- R --version
- R -e '.libPaths(); sessionInfo()'
- Rscript -e 'install.packages("knitr", dep = TRUE, repos = c("http://rforge.net", "http://cran.rstudio.org"))'
# run tests
script:
- make ${TARGET}