Permalink
Fetching contributors…
Cannot retrieve contributors at this time
60 lines (50 sloc) 1.45 KB
language: r
sudo: false
# environment variables
env:
matrix:
- TARGET=travis
- TARGET=integration DISPLAY=:99.0
# capturing state, early exit if no integration test is needed
before_install:
- export PATH=$HOME/texlive/bin/x86_64-linux:$PATH
- tlmgr update --self --all; mktexlsr
- tlmgr conf texmf TEXMFHOME $(Rscript -e "cat(file.path(R.home('share'), 'texmf'))")
- 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
- "curl https://xran.yihui.name/.gitconfig -o ~/.gitconfig"
- Rscript -e 'update.packages(.libPaths()[1], ask = FALSE)'
- Rscript -e "if (!require('covr')) install.packages('covr')"
addons:
apt:
packages:
- ghc
- highlight
- optipng
- coffeescript
- asymptote
- graphviz
- scala
- qpdf
- texinfo
repos:
XRAN: https://xran.yihui.name
cache:
packages: yes
directories:
- $HOME/cache
before_script:
- Rscript -e "if (!require('webshot')) devtools::install_github('wch/webshot')"
# run tests
script:
- rm knitr-examples/cache -rf
- make ${TARGET}
- "[ $TARGET = travis ] && Rscript tools/covr.R || true"
# deploy to xran after integration tests
after_success:
- export R_PKG="$(basename $TRAVIS_REPO_SLUG)"
- "[ $TARGET = integration ] && (curl https://xran.yihui.name/r-xran | bash)"