language: python
python:
  - "2.7"
  - "3.6"
  - "3.8"
env:
services:
matrix:
  include:
    - python: "2.7"
      env: CONTAINER=centos:7
      services:
        - docker
      sudo: required
    - python: "3.8"
      env: CONTAINER=centos:8
      services:
        - docker
      sudo: required

install:
  - if [ ! -z "$CONTAINER" ]; then make install-container-test CONTAINER=$CONTAINER; fi
  - if [ -z "$CONTAINER" ]; then make install-test; fi
  - if [ -z "$CONTAINER" ]; then pip install --editable .; fi

script:
  - if [ ! -z "$CONTAINER" ]; then make container-test; else make test; fi
