image: python:3.6

cache:
    paths:
        - .tox

before_script:
    # Install pyenv
    - apt-get update
    - apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev
    - git clone https://github.com/pyenv/pyenv.git ~/.pyenv
    - export PYENV_ROOT="$HOME/.pyenv"
    - export PATH="$PYENV_ROOT/bin:$PATH"
    - eval "$(pyenv init -)"
    # Install tox
    - pyenv install 3.6 3.7

tests:
    script:
        - pip install tox
        - tox
