# (c) 2020 by flonatel GmbH & Co. KG / Andreas Florath
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
# This file is part of rmtoo.
#
# rmtoo is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# rmtoo is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with rmtoo.  If not, see <https://www.gnu.org/licenses/>.

language: python

git:
  depth: 5000

dist: bionic

python:
  - "3.5"
  - "3.6"
  - "3.7"
  - "3.8"

# Required to run the respective python env in tox
install: pip install tox-travis flit

# command to run tests
script:
  - tox
  - tox -e pep8

after_success:
  - bash <(curl -s https://codecov.io/bash)

# The FLIT_PASSWORD environment variable needs to be set in travis with a
# working pypi token, see https://pypi.org/help/#apitoken
jobs:
  include:
    - stage: deploy
      python: 3.8
      env:
      - FLIT_USERNAME=__token__
      deploy:
        provider: script
        script: flit publish
        on:
          tags: true
