language: python

matrix:
  include:
    - python: "2.7"
    - python: "pypy"
      env: PYPY_VERSION="4.0.1"

cache:
  directories:
    - $HOME/.cache/pip

before_install:
  # If necessary, set up an appropriate version of pypy.
  - if [ ! -z "$PYPY_VERSION" ]; then source utils/setup-pypy-travis.sh; fi
  - if [ ! -z "$PYPY_VERSION" ]; then python --version 2>&1 | fgrep "PyPy $PYPY_VERSION"; fi

install:
  - pip install 'pip>=7.1.2'
  - pip install coveralls
  - pip install -r requirements-dev.txt
  - pip install -e .

script:
  - flake8 sideloader
  - py.test --cov=sideloader --cov-report=term

after_success:
  - coveralls

language: python

matrix:
  include:
    - python: "2.7"
    # Disable coverage tests for pypy as they'll always be the same as CPython
    - python: "pypy"
      env: PYPY_VERSION="4.0.1" NO_COVERAGE=1

cache:
  directories:
    - $HOME/.cache/pip

before_install:
  # If necessary, set up an appropriate version of pypy.
  - if [ ! -z "$PYPY_VERSION" ]; then source utils/setup-pypy-travis.sh; fi
  - if [ ! -z "$PYPY_VERSION" ]; then python --version 2>&1 | fgrep "PyPy $PYPY_VERSION"; fi

install:
  - pip install 'pip>=7.1.2'
  - pip install coveralls
  - pip install -r requirements-dev.txt
  - pip install -e .

script:
  - flake8 sideloader
  - if [ -z "$NO_COVERAGE" ]; then COVERAGE_OPTS="--cov=sideloader --cov-report=term"; else COVERAGE_OPTS=""; fi
  - py.test $COVERAGE_OPTS sideloader

after_success:
  - if [ -z "$NO_COVERAGE" ]; then coveralls; fi

Disable coverage tests for pypy
Travis: Disable coverage tests for pypy
