---
dist: xenial
sudo: true

language: python
python:
  - 3.6
  - 3.7

stages:
  - lint
  - test
  - build

env:  # enable allow_failures
matrix:
  allow_failures:
    - env: TOXENV=pylint
    - python: 3.7

jobs:
  include:
    - { stage: lint, python: 3.6, env: TOXENV=flake8 }
    - { stage: lint, python: 3.6, env: TOXENV=pylint }

before_install:
  - sudo apt-get update
  - PYTHON_MAJOR=$(python -c 'import sys; print(sys.version[0])')
  # - if [ $PYTHON_MAJOR = '3' ]; then sudo apt-get install -y python3-wxgtk4.0; fi
  - dpkg -l *wxgtk*

install: pip install tox-travis
script: tox

---
dist: xenial
sudo: true

language: python
python:
  - 3.6
  - 3.7

stages:
  - lint
  - test
  - publish

env:  # enable allow_failures
matrix:
  allow_failures:
    - env: TOXENV=pylint
    - python: 3.7

jobs:
  include:
    - { stage: lint, python: 3.6, env: TOXENV=flake8 }
    - { stage: lint, python: 3.6, env: TOXENV=pylint }

    - stage: publish
      script: skip
      deploy:
        provider: pypi
        user: coolRR
        password:
          secure: <travis-encrypt-value-here>
      on:
        tags: true

before_install:
  - sudo apt-get update
  - PYTHON_MAJOR=$(python -c 'import sys; print(sys.version[0])')
  # - if [ $PYTHON_MAJOR = '3' ]; then sudo apt-get install -y python3-wxgtk4.0; fi
  - dpkg -l *wxgtk*

install: pip install tox-travis
script: tox

Deploy on PyPI when pushing a tag
Deploy on PyPI when pushing a tag
