before_script:
  - pip install tox setuptools
cache:
  paths:
  - /root/.cache
stages:
  - style
  - test
  - package

py27:
  stage: test
  image: python:2.7
  script:
    - tox -e py27

py35:
  stage: test
  image: python:3.5
  script:
    - tox -e py35

py36:
  stage: test
  image: python:3.6
  script:
    - tox -e py36

py37:
  stage: test
  image: python:3.7
  script:
    - tox -e py37

py38:
  stage: test
  image: python:3.8
  script:
    - tox -e py38

pep8:
  image: python:3.6
  stage: style
  script:
    - tox -e pep8

wheel:
  image: python:3.6
  stage: package
  script:
    tox -e wheel
  artifacts:
    paths:
      - dist/

sdist:
  image: python:3.6
  stage: package
  script:
    tox -e sdist
  artifacts:
    paths:
      - dist/