From 0e8a3c506302d59776a78b7c92f5cb8c602c9fcc Mon Sep 17 00:00:00 2001 From: Jonathan Kim Date: Wed, 19 Jun 2019 18:25:21 +0100 Subject: [PATCH] Update travis.yml (#1010) * Use xenial dist * Only install coveralls after success * Latest version of pypi * Refactor travis.yml into stages and add travis-tox * Drop 2.6 * Bump to python 3.7 --- .travis.yml | 65 ++++++++++++++++++++++++++++++----------------------- tox.ini | 4 ++-- 2 files changed, 39 insertions(+), 30 deletions(-) diff --git a/.travis.yml b/.travis.yml index 33c8665a..66cf76e0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,35 +1,44 @@ language: python -matrix: - include: - - env: TOXENV=py27 - python: 2.7 - - env: TOXENV=py35 - python: 3.5 - - env: TOXENV=py36 - python: 3.6 - - env: TOXENV=py37 - python: 3.7 - dist: xenial - sudo: true - - env: TOXENV=pypy - python: pypy-5.7.1 - - env: TOXENV=pre-commit - python: 3.6 - - env: TOXENV=mypy - python: 3.6 +dist: xenial + +python: + - "2.7" + - "3.5" + - "3.6" + - "3.7" + - "pypy3" + install: - - pip install coveralls tox + - pip install tox tox-travis script: tox -after_success: coveralls +after_success: + - pip install coveralls + - coveralls cache: directories: - $HOME/.cache/pip - $HOME/.cache/pre-commit -deploy: - provider: pypi - user: syrusakbary - on: - tags: true - password: - secure: LHOp9DvYR+70vj4YVY8+JRNCKUOfYZREEUY3+4lMUpY7Zy5QwDfgEMXG64ybREH9dFldpUqVXRj53eeU3spfudSfh8NHkgqW7qihez2AhSnRc4dK6ooNfB+kLcSoJ4nUFGxdYImABc4V1hJvflGaUkTwDNYVxJF938bPaO797IvSbuI86llwqkvuK2Vegv9q/fy9sVGaF9VZIs4JgXwR5AyDR7FBArl+S84vWww4vTFD33hoE88VR4QvFY3/71BwRtQrnCMm7AOm31P9u29yi3bpzQpiOR2rHsgrsYdm597QzFKVxYwsmf9uAx2bpbSPy2WibunLePIvOFwm8xcfwnz4/J4ONBc5PSFmUytTWpzEnxb0bfUNLuYloIS24V6OZ8BfAhiYZ1AwySeJCQDM4Vk1V8IF6trTtyx5EW/uV9jsHCZ3LFsAD7UnFRTosIgN3SAK3ZWCEk5oF2IvjecsolEfkRXB3q9EjMkkuXRUeFDH2lWJLgNE27BzY6myvZVzPmfwZUsPBlPD/6w+WLSp97Rjgr9zS3T1d4ddqFM4ZYu04f2i7a/UUQqG+itzzuX5DWLPvzuNt37JB45mB9IsvxPyXZ6SkAcLl48NGyKok1f3vQnvphkfkl4lni29woKhaau8xlsuEDrcwOoeAsVcZXiItg+l+z2SlIwM0A06EvQ= - distributions: "sdist bdist_wheel" + +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: + provider: pypi + user: syrusakbary + on: + tags: true + password: + secure: LHOp9DvYR+70vj4YVY8+JRNCKUOfYZREEUY3+4lMUpY7Zy5QwDfgEMXG64ybREH9dFldpUqVXRj53eeU3spfudSfh8NHkgqW7qihez2AhSnRc4dK6ooNfB+kLcSoJ4nUFGxdYImABc4V1hJvflGaUkTwDNYVxJF938bPaO797IvSbuI86llwqkvuK2Vegv9q/fy9sVGaF9VZIs4JgXwR5AyDR7FBArl+S84vWww4vTFD33hoE88VR4QvFY3/71BwRtQrnCMm7AOm31P9u29yi3bpzQpiOR2rHsgrsYdm597QzFKVxYwsmf9uAx2bpbSPy2WibunLePIvOFwm8xcfwnz4/J4ONBc5PSFmUytTWpzEnxb0bfUNLuYloIS24V6OZ8BfAhiYZ1AwySeJCQDM4Vk1V8IF6trTtyx5EW/uV9jsHCZ3LFsAD7UnFRTosIgN3SAK3ZWCEk5oF2IvjecsolEfkRXB3q9EjMkkuXRUeFDH2lWJLgNE27BzY6myvZVzPmfwZUsPBlPD/6w+WLSp97Rjgr9zS3T1d4ddqFM4ZYu04f2i7a/UUQqG+itzzuX5DWLPvzuNt37JB45mB9IsvxPyXZ6SkAcLl48NGyKok1f3vQnvphkfkl4lni29woKhaau8xlsuEDrcwOoeAsVcZXiItg+l+z2SlIwM0A06EvQ= + distributions: "sdist bdist_wheel" diff --git a/tox.ini b/tox.ini index 57d1f78e..a519cb1e 100644 --- a/tox.ini +++ b/tox.ini @@ -14,7 +14,7 @@ commands = py{36,37}: py.test --cov=graphene graphene examples tests_asyncio tests_py36 {posargs} [testenv:pre-commit] -basepython=python3.6 +basepython=python3.7 deps = pre-commit>0.12.0 setenv = @@ -23,7 +23,7 @@ commands = pre-commit {posargs:run --all-files} [testenv:mypy] -basepython=python3.6 +basepython=python3.7 deps = mypy commands =