Refactor travis.yml into stages and add travis-tox

This commit is contained in:
Jonathan Kim 2019-06-14 12:16:34 +01:00
parent 1048b6163e
commit 9d32a3b7e8

View File

@ -1,39 +1,40 @@
language: python language: python
dist: xenial dist: xenial
matrix: python:
include: - "2.6"
- env: TOXENV=py27 - "2.7"
python: 2.7 - "3.5"
- env: TOXENV=py35 - "3.6"
python: 3.5 - "3.7"
- env: TOXENV=py36 - "pypy3"
python: 3.6
- env: TOXENV=py37
python: 3.7
dist: xenial
sudo: true
- env: TOXENV=pypy
python: pypy
- env: TOXENV=pre-commit
python: 3.6
- env: TOXENV=mypy
python: 3.6
install: install:
- pip install tox - pip install tox tox-travis
script: tox script: tox
after_success: after_success:
- pip install coveralls - pip install coveralls
- coveralls - coveralls
cache: cache:
directories: directories:
- $HOME/.cache/pip - $HOME/.cache/pip
- $HOME/.cache/pre-commit - $HOME/.cache/pre-commit
stages:
- test
- name: deploy
if: tag IS present
jobs:
fast_finish: true
include:
- env: TOXENV=pre-commit
python: 3.7
- env: TOXENV=mypy
python: 3.7
- stage: deploy
python: 3.7
after_success: true
deploy: deploy:
provider: pypi provider: pypi
user: syrusakbary user: syrusakbary