 language: python
cache: pip

python:
  - "3.6"
  - "3.7"
  - "3.8"

git:
  depth: 25
  quiet: true

before_install:
  - sudo apt-get install unixodbc-dev
  - sudo apt-get install libblas-dev liblapack-dev libatlas-base-dev gfortran

install:
  - pip install pip --upgrade
  - pip install -r requirements.txt
  - pip install -r requirements_dev.txt
  - python setup.py install

script: pytest --cov=predictit tests/

deploy:
  - provider: pypi
    skip_cleanup: true
    skip_existing: true
    distributions: "sdist bdist_wheel"
    username: "__token__"
    password:
      secure: "__SETUP_YOUR_PYPI_SECURE__"
    on:
      tags: true
      python: "3.7"

  - provider: releases
    api_key:
      secure: __SETUP_YOUR_GITHUB_SECURE__
    skip_cleanup: false
    overwrite: true
    on:
      tags: true
      python: "3.7"

after_success:
  - bash <(curl -s https://codecov.io/bash)
