Created
January 16, 2018 12:55
-
-
Save ernestguevarra/998199fe32864cbcc3bb25de1860fafe to your computer and use it in GitHub Desktop.
Travis settings for Shiny testing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dist: trusty # Use Ubuntu 14.04 image (instead of 12.04) | |
language: r | |
sudo: false | |
r: 3.4.1 | |
# Install packrat if needed and have it restore packages. | |
install: | |
- R -e 'if (system.file(package="packrat") == "") install.packages("packrat")' | |
- R -e "packrat::packify(); packrat::restore()" | |
cache: | |
# Main R library | |
packages: true | |
directories: | |
# Packrat packages | |
- packrat/lib | |
# PhantomJS | |
- travis_phantomjs | |
# Install PhantomJS (if not cached) | |
before_install: | |
- "export PHANTOMJS_VERSION=2.1.1" | |
- "phantomjs --version" | |
- "export PATH=$PWD/travis_phantomjs/phantomjs-$PHANTOMJS_VERSION-linux-x86_64/bin:$PATH" | |
- "hash -r" | |
- "phantomjs --version" | |
- "if [ $(phantomjs --version) != $PHANTOMJS_VERSION ]; then rm -rf $PWD/travis_phantomjs; mkdir -p $PWD/travis_phantomjs; fi" | |
- "if [ $(phantomjs --version) != $PHANTOMJS_VERSION ]; then wget https://github.com/Medium/phantomjs/releases/download/v$PHANTOMJS_VERSION/phantomjs-$PHANTOMJS_VERSION-linux-x86_64.tar.bz2 -O $PWD/travis_phantomjs/phantomjs-$PHANTOMJS_VERSION-linux-x86_64.tar.bz2; fi" | |
- "if [ $(phantomjs --version) != $PHANTOMJS_VERSION ]; then tar -xvf $PWD/travis_phantomjs/phantomjs-$PHANTOMJS_VERSION-linux-x86_64.tar.bz2 -C $PWD/travis_phantomjs; fi" | |
- "if [ $(phantomjs --version) != $PHANTOMJS_VERSION ]; then hash -r; fi" | |
- "phantomjs --version" | |
script: | |
- R -f run_tests.R |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment