Skip to content

Commit

Permalink
Update the CI while at it.
Browse files Browse the repository at this point in the history
  • Loading branch information
metatoaster committed Nov 23, 2016
1 parent 355dbf0 commit fe7e409
Showing 1 changed file with 39 additions and 16 deletions.
55 changes: 39 additions & 16 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,44 +2,60 @@ sudo: false
matrix:
allow_failures:
- os: osx
- python: 3.6-dev
- env: TRAVIS_NODE_VERSION=7
include:
- language: python
python: 2.7
addons:
env: TRAVIS_NODE_VERSION=0.12
- language: python
python: 3.3
addons:
env: TRAVIS_NODE_VERSION=4.6
- language: python
python: 3.4
addons:
env: TRAVIS_NODE_VERSION=4.6
- language: python
python: 3.5
addons:
env: TRAVIS_NODE_VERSION=6.9
- language: python
python: 3.6-dev
env: TRAVIS_NODE_VERSION=7
- language: python
python: pypy
addons:
env: TRAVIS_NODE_VERSION=0.12
- language: python
python: pypy3
env: TRAVIS_NODE_VERSION=6.9
# test different versions of Node.js on osx
- language: node_js
node_js: 4.5
node_js: 4.6
os: osx
env: PY_VER=3.4.5
env: TRAVIS_PYTHON_VERSION=3.4.5
- language: node_js
node_js: 6.5
node_js: 6.9
os: osx
env: PY_VER=3.5.2
env: TRAVIS_PYTHON_VERSION=3.5.2

before_install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
brew update || brew update ;
brew install pyenv ;
brew outdated pyenv || brew upgrade pyenv ;
pyenv install $PY_VER ;
pyenv global $PY_VER ;
pyenv install $TRAVIS_PYTHON_VERSION ;
pyenv global $TRAVIS_PYTHON_VERSION ;
pyenv rehash ;
python -m pip install --user virtualenv ;
python -m virtualenv ~/.venv ;
source ~/.venv/bin/activate ;
else
rm -rf ~/.nvm ;
git clone https://github.com/creationix/nvm.git ~/.nvm ;
(cd ~/.nvm && git checkout `git describe --abbrev=0 --tags` );
source ~/.nvm/nvm.sh ;
nvm install "$TRAVIS_NODE_VERSION" ;
fi
- node --version
- npm --version

install:
- pip install nose coverage flake8
Expand All @@ -48,12 +64,19 @@ install:
- python setup.py develop
script:
- flake8 setup.py src
- nosetests --with-coverage --cover-package=calmjs.bower --with-doctest
- coverage report -m
# Alternatively without nose
# - coverage run --include=src/* -m unittest calmjs.bower.tests.make_suite
# - coverage report -m
# with pypy version >= 2.5.0 (maybe earlier, definitely after 2.2.1),
# coverage fails to produce meaningful results running with nose.
# Check that and only use nose (which is only somewhat useful only
# when errors happen) with CPython. This happened on the prior
# changeset (ee599b4d) where checks and testing with callbacks that
# lead to recursive calling of functions were added.
- if [[ $TRAVIS_PYTHON_VERSION == pypy* ]]; then
coverage run --include=src/* -m unittest calmjs.bower.tests.make_suite ;
else
nosetests --with-coverage --cover-package=calmjs.bower --with-doctest ;
fi
after_success:
- coverage report -m
# only submit coverage when testing under linux.
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
pip install coveralls ;
Expand Down

0 comments on commit fe7e409

Please sign in to comment.