language: python
python:
    - "3.4"
    - "3.5"
    - "3.6"
before_install:
    # Must add a display for visualization to work
    - "export DISPLAY=:99.0"
    - "sh -e /etc/init.d/xvfb start"
    - sleep 3
    - pip install pytest pytest-cov coveralls
    - sleep 2
    # Make sure everything is ready
script:
    - mv pychemkin pychemkin_backup
    - mv setup.py setup.py.backup
    - ls   
    # test install from pip
    - pip install pychemkin
    - ls
    - py.test
    #recover
    - mv pychemkin_backup pychemkin
    - mv setup.py.backup setup.py
    - ls
    - pip uninstall --yes pychemkin
    # test package build
    - python setup.py sdist --format=tar
    - pip install dist/pychemkin-1.1.8.tar
    - py.test    
    # DO NOT BUILD SCIPY --IT'S EVAL
    - pip install numpy pandas scipy
    - python setup.py install
    - python setup.py test
after_success:
    - coveralls
