sudo: false

language: python

cache: pip

python: ["2.7", "3.2", "3.3", "3.4", "3.5", "3.6", "3.7", "pypy"]

install:
  - pip install jsonpickle
  - pip install nose
  - pip install coveralls
  - pip install unittest2
  - pip install mock
  - pip install 'django==1.8.8'

script:
  - pip install jsonpickle
  # Django 1.8 requires Python 2.7+
  - if [[ $TRAVIS_PYTHON_VERSION != 2.6 && $TRAVIS_PYTHON_VERSION == 2* ]]; then coverage run -m unittest2 discover python2; fi
  # Coverage/Coveralls has dropped support for Python 3.2
  - if [[ $TRAVIS_PYTHON_VERSION != 3.2 && $TRAVIS_PYTHON_VERSION == 3* ]]; then coverage run -m unittest discover python3; fi
  - if [[ $TRAVIS_PYTHON_VERSION == 'pypy' ]]; then coverage run -m unittest2 discover python2; fi
  # - if [[ $TRAVIS_PYTHON_VERSION == 'pypy3' ]]; then coverage run -m unittest discover python3; fi

after_success:
  coveralls

sudo: false

language: python

cache: pip

python: ["2.7", "3.2", "3.3", "3.4", "3.5", "3.6", "pypy"]

# Workaround to install Python 3.7
# https://github.com/travis-ci/travis-ci/issues/9815
matrix:
  include:
    - python: 3.7
      dist: xenial
      sudo: true

install:
  - pip install jsonpickle
  - pip install nose
  - pip install coveralls
  - pip install unittest2
  - pip install mock
  - pip install 'django==1.8.8'

script:
  - pip install jsonpickle
  # Django 1.8 requires Python 2.7+
  - if [[ $TRAVIS_PYTHON_VERSION != 2.6 && $TRAVIS_PYTHON_VERSION == 2* ]]; then coverage run -m unittest2 discover python2; fi
  # Coverage/Coveralls has dropped support for Python 3.2
  - if [[ $TRAVIS_PYTHON_VERSION != 3.2 && $TRAVIS_PYTHON_VERSION == 3* ]]; then coverage run -m unittest discover python3; fi
  - if [[ $TRAVIS_PYTHON_VERSION == 'pypy' ]]; then coverage run -m unittest2 discover python2; fi
  # - if [[ $TRAVIS_PYTHON_VERSION == 'pypy3' ]]; then coverage run -m unittest discover python3; fi

after_success:
  coveralls

Apply Python 3.7 Travis workaround
Apply Python 3.7 Travis workaround
