language: python

services:
 - docker

matrix:
 include:
  - name: "Python 3.5"
    python: 3.5
    env: what="python"
  - name: "Python 3.6"
    python: 3.6
    env: what="python"
  - name: "Python 3.7"
    python: 3.7
    env: what="python"
    dist: xenial
    sudo: true
  - name: "Docker image"
    env: what="docker"

install:
 - if [ "$what" = "python" ] ; then pip install -r requirements.txt ; fi
 - if [ "$what" = "python" ] ; then yarn ; fi

script:
 - if [ "$what" = "python" ] ; then pytest --cov=c3bottles ; fi
 - if [ "$what" = "python" ] ; then pycodestyle c3bottles ; fi
 - if [ "$what" = "python" ] ; then yarn build:deps ; fi
 - if [ "$what" = "docker" ] ; then docker build -t c3bottles/c3bottles . ; fi
 - if [ "$what" = "docker" ] ; then docker image ls ; fi
 - if [ "$what" = "docker" ] ; then docker run --rm --entrypoint /bin/sh c3bottles/c3bottles -c "pip install pytest flask-webtest && pytest" ; fi

language: python

services:
 - docker

matrix:
 include:
  - name: "Python 3.5"
    python: 3.5
    env: what="python"
  - name: "Python 3.6"
    python: 3.6
    env: what="python"
    dist: xenial
    sudo: true
  - name: "Python 3.7"
    python: 3.7
    env: what="python"
    dist: xenial
    sudo: true
  - name: "Docker image"
    env: what="docker"

install:
 - if [ "$what" = "python" ] ; then pip install -r requirements.txt ; fi
 - if [ "$what" = "python" ] ; then yarn ; fi

script:
 - if [ "$what" = "python" ] ; then pytest --cov=c3bottles ; fi
 - if [ "$what" = "python" ] ; then pycodestyle c3bottles ; fi
 - if [ "$what" = "python" ] ; then yarn build:deps ; fi
 - if [ "$what" = "docker" ] ; then docker build -t c3bottles/c3bottles . ; fi
 - if [ "$what" = "docker" ] ; then docker image ls ; fi
 - if [ "$what" = "docker" ] ; then docker run --rm --entrypoint /bin/sh c3bottles/c3bottles -c "pip install pytest flask-webtest && pytest" ; fi

Fix Travis build for Python 3.6?
Fix Travis build for Python 3.6?
