Skip to content

Commit

Permalink
Improve Travis CI (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
LKaemmerling authored Feb 22, 2019
1 parent 81bd2ee commit caca2e5
Showing 1 changed file with 32 additions and 13 deletions.
45 changes: 32 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
language: python
dist: xenial
sudo: true
stages:
- test
- codingstyle
- name: deploy
if: tag IS present
python:
- '2.7'
- '3.5'
- '3.6'
matrix:
include:
- python: 3.7
dist: xenial
sudo: true
- '3.7'

before_script:
- docker pull lkdevelopment/hetzner-cloud-api-mock
- docker run -d -p 127.0.0.1:4000:8080 lkdevelopment/hetzner-cloud-api-mock
Expand All @@ -17,11 +21,26 @@ install:
- pip install .
- pip install -r requirements/test.txt
- pip install tox-travis
script: tox && tox -e flake8
deploy:
provider: pypi
user: "$PYPIUSER"
password:
secure: IDBPB3zIu17qOuw1IePaEg2JGFiEDBpnhIWSr4qwCC6QwCyTcaQpn/Nt2GfkXI5M5Pp9eiePgRXVjriJPAVFaA/tC56gfAXiTs0I6/pY/i24f+TDr6Vp+73FV2q2u4vnhBgRjtXWLHEorhE2JfeUhnu+1rC49FP43NqOW3qFBEU09UkXsVZg1Z4mabWOew2GNe5kX5CVL9bLV2h96FutsM6VJsetVS/20gQrrIQJlHhmyLlSixj+z9p/m1cILy2lww/cNPgK9KLiLtNYibYRaI5uKShDHFtmxfGFNatsVEAcF0ZENBp4N44x5hQHxnNTaLjFTjNeRd7smCEAhULXCxVgo11Fz3yl1xQrTXEBkR7KcvKDnaAkjrYrwxRoGCmdWbBUMKpTjR7+/hcTr7TBI93u9GU+FZikVdba6CkVgy/tlTZjpz/Toxo7RSldRQxm9IsyP1HezgBgiQeU3JZnPDmANyMA2q3b4ee+QLj4NoblgEREEKju2x42gGbMQd0am8AvwOVnET/yMcd5vJxGQWEvRRzseLjzw0JJ7b295RMD1kxdfjYrMu3Lvt+WZY7DOTyfvaXU44EbWEFGRdfpHu9kgtl84NWEfKJc4p9bACL2Go+ROe9BeVzTPE9cFCemR2E4tvyHI2fq/GqtQ6P/Y7uSdLTtfasB9A2Xk9IBZRA=
on:
tags: true

script: tox

jobs:
include:
- stage: codingstyle
env: STAGE=style_check
python: "3.6"
script: tox -e flake8
- stage: deploy
env: STAGE=deploy
if: tag IS present
python: "3.6"
script: echo "Deploy to pypi"
deploy:
provider: pypi
user: "$PYPIUSER"
password:
secure: IDBPB3zIu17qOuw1IePaEg2JGFiEDBpnhIWSr4qwCC6QwCyTcaQpn/Nt2GfkXI5M5Pp9eiePgRXVjriJPAVFaA/tC56gfAXiTs0I6/pY/i24f+TDr6Vp+73FV2q2u4vnhBgRjtXWLHEorhE2JfeUhnu+1rC49FP43NqOW3qFBEU09UkXsVZg1Z4mabWOew2GNe5kX5CVL9bLV2h96FutsM6VJsetVS/20gQrrIQJlHhmyLlSixj+z9p/m1cILy2lww/cNPgK9KLiLtNYibYRaI5uKShDHFtmxfGFNatsVEAcF0ZENBp4N44x5hQHxnNTaLjFTjNeRd7smCEAhULXCxVgo11Fz3yl1xQrTXEBkR7KcvKDnaAkjrYrwxRoGCmdWbBUMKpTjR7+/hcTr7TBI93u9GU+FZikVdba6CkVgy/tlTZjpz/Toxo7RSldRQxm9IsyP1HezgBgiQeU3JZnPDmANyMA2q3b4ee+QLj4NoblgEREEKju2x42gGbMQd0am8AvwOVnET/yMcd5vJxGQWEvRRzseLjzw0JJ7b295RMD1kxdfjYrMu3Lvt+WZY7DOTyfvaXU44EbWEFGRdfpHu9kgtl84NWEfKJc4p9bACL2Go+ROe9BeVzTPE9cFCemR2E4tvyHI2fq/GqtQ6P/Y7uSdLTtfasB9A2Xk9IBZRA=
on:
tags: true
condition: $STAGE=deploy

0 comments on commit caca2e5

Please sign in to comment.