This can now be accomplished using the build steps that are currently in beta. It looks something like this:
stages:
- test
- deploy
jobs:
include:
- stage: test
- stage: deploy
Given a .travis.ymlas follows:
language: python
sudo: false
cache: pip
python:
- 2.7
- 3.4
- 3.5
- 3.6
- pypy
install:
- pip install tox-travis
script:
- tox
deploy:
provider: pypi
user: stephenfin
password:
secure: <key omitted for brevity>
on:
tags: true
distributions: sdist bdist_wheel
You would convert it like this:
language: python
sudo: false
cache: pip
python:
- 2.7
- 3.4
- 3.5
- 3.6
- pypy
install:
- pip install tox-travis
script:
- tox
stages:
- test
- deploy
jobs:
include:
- stage: deploy
python: 3.6
install: skip # no tests, no depedencies needed
script: skip # we're not running tests
deploy:
provider: pypi
user: stephenfin
password:
secure: <key omitted for brevity>
on:
tags: true
distributions: sdist bdist_wheel
: , , , stage. test python, install script. , , . test, . , Travis tox-travis ( 0.10), .
, Travis Gem, travis lint , . .