language: python
dist: trusty
sudo: false

matrix:
    include:
        - python: '3.6'
          env: ORANGE_INSTALL=conda
        - python: '3.6'
          env: ORANGE_INSTALL=source

cache:
    apt: true
    pip: true
    ccache: true

before_install:
    - source $TRAVIS_BUILD_DIR/.travis/install_miniconda.sh
    - echo $TRAVIS_PYTHON_VERSION
    - conda env create -f conda_environment.yml python=$TRAVIS_PYTHON_VERSION
    - source $TRAVIS_BUILD_DIR/.travis/install_orange.sh
    - source activate orange3-single-cell

install:
    - pip install -U pip wheel coverage codecov
    - source $TRAVIS_BUILD_DIR/.travis/install_orange.sh
    - pip install -e .
    - pip freeze

script:
    - catchsegv xvfb-run -a -s "-screen 0 1280x1024x24" coverage run setup.py test

after_success:
    - codecov