language: python
sudo: false
cache:
  directories:
    - $HOME/.cache/pip
python:
  - "2.7"
  - "3.4"
  - "3.5"
  - "3.6"
  - "3.6-dev"
  - "3.7-dev"
  - "pypy2.7-5.10.0"
  - "pypy3.5-5.10.1"

install:
  - travis_retry pip install --upgrade pip setuptools
  - travis_retry pip install -r requirements.txt
  - travis_retry pip install -r test-requirements.txt
  - travis_retry pip install coveralls coverage nose-cov
  - echo TRAVIS_PYTHON_VERSION=${TRAVIS_PYTHON_VERSION}
  - if [ ${TRAVIS_PYTHON_VERSION:0:1} != "3" ]; then travis_retry pip install contextlib2; fi
  - python setup.py --version

# Run test
script:
  - if [ $TRAVIS_PYTHON_VERSION == "3.4" ]; then nosetests -v --with-cov --cov streamparse --cov-config .coveragerc --logging-level=DEBUG; fi
  - if [ $TRAVIS_PYTHON_VERSION != "3.4" ]; then nosetests -v --logging-level=DEBUG; fi

# Calculate coverage on success
after_success:
  - if [ $TRAVIS_PYTHON_VERSION == "3.4" ]; then coveralls; fi

language: python
sudo: false
cache:
  directories:
    - $HOME/.cache/pip
python:
  - "2.7"
  - "3.4"
  - "3.5"
  - "3.6"
  - "3.6-dev"
  - "3.7-dev"
  - "pypy2.7-5.10.0"
  - "pypy3.5-5.10.1"

matrix:
  fast_finish: true
  allow_failures:
    - python: '3.7-dev'

install:
  - travis_retry pip install --upgrade pip setuptools
  - travis_retry pip install -r requirements.txt
  - travis_retry pip install -r test-requirements.txt
  - travis_retry pip install coveralls coverage nose-cov
  - echo TRAVIS_PYTHON_VERSION=${TRAVIS_PYTHON_VERSION}
  - if [ ${TRAVIS_PYTHON_VERSION:0:1} != "3" ]; then travis_retry pip install contextlib2; fi
  - python setup.py --version

# Run test
script:
  - if [ $TRAVIS_PYTHON_VERSION == "3.4" ]; then nosetests -v --with-cov --cov streamparse --cov-config .coveragerc --logging-level=DEBUG; fi
  - if [ $TRAVIS_PYTHON_VERSION != "3.4" ]; then nosetests -v --logging-level=DEBUG; fi

# Calculate coverage on success
after_success:
  - if [ $TRAVIS_PYTHON_VERSION == "3.4" ]; then coveralls; fi

Allow failures for 3.7-dev because it ruamel-yaml does not work with it
Allow failures for 3.7-dev because it ruamel-yaml does not work with it
