forked from yihui/knitr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
66 lines (57 loc) · 1.87 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
language: c
sudo: false
# environment variables
env:
matrix:
- TARGET=travis
- TARGET=integration DISPLAY=:99.0
global:
secure: AwMvWbAlUxA/SNmXpfm3zL7o5ohB2Qp/qyCrYdLRc8u9v6FBQAVq0NXghsN9NVCUiNO+unSr7qXj9JDcRyx6qj67nEzTM3Pcq1iEUAoWQyhDw9gyTls8wya2K4PG86b2yUAtVFkYBYDakjuTdo786Ili+Dsw4XP0PgtnuozCxuY=
# capturing state, early exit if no integration test is needed
before_install:
- export PATH=$HOME/bin:$HOME/texlive/bin/x86_64-linux:$PATH
- 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
addons:
apt:
sources:
- r-packages-precise
packages:
- r-base-dev
- r-recommended
- ghc
- highlight
- optipng
- coffeescript
- asymptote
- graphviz
- scala
- qpdf
- texinfo
# install dependencies
install:
- "[ ! -d ~/bin ] && mkdir ~/bin || true"
- "wget -q -O - https://github.com/yihui/crandalf/raw/master/inst/scripts/install-texlive | bash"
- "wget -q -O - https://github.com/yihui/crandalf/raw/master/inst/scripts/install-pandoc | bash"
- "wget -q -O - http://yihui.name/xran/r-config | bash"
- Rscript -e "if (!require('devtools')) install.packages('devtools')"
- Rscript -e 'devtools::install_deps(dep = TRUE); update.packages(.libPaths()[1], ask = FALSE)'
- Rscript -e "if (!require('covr')) install.packages('covr')"
cache:
directories:
- $HOME/R
- $HOME/texlive
- $HOME/bin
# run tests
script:
- make ${TARGET}
# deploy to xran after integration tests
after_success:
- export R_PKG="$(basename $TRAVIS_REPO_SLUG)"
- "[ $TARGET = integration ] && (wget -q -O - http://yihui.name/xran/r-xran | bash)"
# run test coverage only for the travis build
- "[ $TARGET = travis ] && Rscript -e 'covr::coveralls()'"