Skip to content

Commit

Permalink
Rework travis tests back into one file
Browse files Browse the repository at this point in the history
  • Loading branch information
jankatins committed May 19, 2016
1 parent 0b264ca commit 0d3b88c
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 79 deletions.
70 changes: 0 additions & 70 deletions .travis-build.sh

This file was deleted.

42 changes: 33 additions & 9 deletions .travis.yml
Expand Up @@ -17,25 +17,49 @@ env:

r_packages:
- devtools
- Cairo # this was missing on OSX, no idea why this wasn't installed :-( Needed for repr

r_github_packages:
# we currently still need IRdisplay from github in all cases...
- IRkernel/IRdisplay
# currently the pbdZMQ package on cran is borked on Mac OS X, so install it here
- snoweye/pbdZMQ

before_install:
# currently the pbdZMQ package on cran is borked on Mac OS X, so install it here in all cases
- if [[ "$TRAVIS_OS_NAME" == "osx" ]] ; then Rscript -e "devtools::install_github('snoweye/pbdZMQ')"
# Cairo was missing on OSX, no idea why this wasn't installed :-( Needed for repr
- if [[ "$TRAVIS_OS_NAME" == "osx" ]] ; then Rscript -e "install.packages('Cairo')"
# Also test newer versions so that we catch errors earlier
- if [[ "${DEPS}" == "github" ]] ; then Rscript -e "devtools::install_github('snoweye/pbdZMQ')"
- if [[ "${DEPS}" == "github" ]] ; then Rscript -e "devtools::install_github('irkernel/repr')"
- if [[ "${DEPS}" == "github" ]] ; then Rscript -e "devtools::install_github('irkernel/IRdisplay')"
- # http://conda.pydata.org/docs/travis.html
- if [[ "$TRAVIS_OS_NAME" == "osx" ]] ; then os=MacOSX || os=Linux
- wget "https://repo.continuum.io/miniconda/Miniconda3-latest-$os-x86_64.sh" -O miniconda.sh
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- hash -r
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda
#Useful for debugging any issues with conda
- conda info -a
- conda create -q -n test-environment python=3.5 jupyter nose
- source activate test-environment
- pip install jupyter_kernel_test

script:
- export PKG_TARBALL=$(Rscript -e "with(as.list(read.dcf('DESCRIPTION')[1, ]), cat(sprintf('%s_%s.tar.gz', Package, Version)))")
- R CMD build .
- R CMD check ${PKG_TARBALL} --as-cran
- export CHECK_LOG=${TRAVIS_BUILD_DIR}/IRkernel.Rcheck/00check.log
- export INSTALL_LOG=${TRAVIS_BUILD_DIR}/IRkernel.Rcheck/00install.out
- bash .travis-build.sh
- Rscript -e 'devtools::test(reporter="check")'
- grep -q -R 'WARNING' "$CHECK_LOG" ; [ $? -ne 0 ]
# TODO: currently we do have 1 NOTE: Found the following assignments to the global environment...
#- grep -q -R 'NOTE' "$CHECK_LOG"; [ $? -ne 0 ]
- R CMD INSTALL "${PKG_TARBALL}"
- export INSTALL_LOG=${TRAVIS_BUILD_DIR}/IRkernel.Rcheck/00install.out
- Rscript -e "IRkernel::installspec()"
- Rscript -e "IRkernel::installspec(name = 'testir', displayname = 'testir')"
- python -W ignore::DeprecationWarning test_ir.py

after_failure:
- travis_fold start check_log
- cat "$CHECK_LOG"
- cat "$INSTALL_LOG"
- travis_fold end check_log
- cat "${CHECK_LOG}"
- cat "${INSTALL_LOG}"

0 comments on commit 0d3b88c

Please sign in to comment.