language: python
python:
  - "3.2"
env:
  - QT_API=PyQt4
  - QT_API=PyQt5
  - PEP8=1
  - COV=1
matrix:
    allow_failures:
        - env: COV=1
        - env: PEP8=1
        - env: QT_API=PyQt5
virtualenv:
  system_site_packages: true
before_install:
  - "export DISPLAY=:99.0"
  - "sh -e /etc/init.d/xvfb start"
install:
  # used for QT_API=pyqt4, COV and PEP8
  - sudo apt-get install -qq python3-pyqt4 --fix-missing
  # PyQt5 (won't be available untill travis upgrade to ubuntu 14.04
  - if [ $QT_API = "pyqt5" ]; then
    sudo apt-get install -qq python3-pyqt5 --fix-missing;
    fi
script:
  - pip install .
  - if [ $QT_API ]; then
    python3 runtests.py;
    fi
  - if [ $PEP8 ]; then
    pip install pytest-pep8;
    python3 runtests.py --pep8 -m pep8;
    fi
  - if [ $COV ]; then
    pip install pytest-cov;
    python3 runtests.py --cov pyqode;
    fi
after_script:
  - if [ $COV ]; then
    sudo pip install --quiet coveralls;
    coveralls;
    fi

language: python
python:
  - "3.2"
env:
  - QT_API=PyQt4
  - QT_API=PyQt5
  - PEP8=1
  - COV=1
matrix:
    allow_failures:
        - env: COV=1
        - env: PEP8=1
        - env: QT_API=PyQt5
virtualenv:
  system_site_packages: true
before_install:
  - "export DISPLAY=:99.0"
  - "sh -e /etc/init.d/xvfb start"
install:
  # used for QT_API=pyqt4, COV and PEP8
  - sudo apt-get install -qq python3-pyqt4 --fix-missing
  # PyQt5 (won't be available untill travis upgrade to ubuntu 14.04
  - if [ $QT_API = "PyQt5" ]; then
    sudo apt-get install -qq python3-pyqt5 --fix-missing;
    fi
script:
  - pip install .
  - if [ $QT_API ]; then
    python3 runtests.py;
    fi
  - if [ $PEP8 ]; then
    pip install pytest-pep8;
    python3 runtests.py --pep8 -m pep8;
    fi
  - if [ $COV ]; then
    pip install pytest-cov;
    python3 runtests.py --cov pyqode;
    fi
after_script:
  - if [ $COV ]; then
    sudo pip install --quiet coveralls;
    coveralls;
    fi

Fix QT_API for PyQt5 (we should get errored instead of faild for this env)
Travis: Fix QT_API for PyQt5 (we should get errored instead of faild for this env)
