Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 36 additions & 14 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,42 @@
stages:
- test
- name: deploy
if: tag IS present

language: python
python:
- "2.7"
- "3.4"
- "3.5"
- "3.6"
- "3.7"
- "3.7-dev"
- "3.8-dev"

install:
- pip install coverage
- pip install pypack

script:
# run tests with coverage
# run tests and report coverage
- coverage run tests/run_tests.py
- coverage report -m
# test distribution packaging
- python -m pypack patch_ng.py
- coverage report -m --omit=tests/run_tests.py

jobs:
include:
- stage: test
python: 2.7
- python: 3.4
- python: 3.5
- python: 3.6
- python: 3.7
- python: 3.8
- stage: deploy
install:
script:
- "PACKAGE_VERSION=$(cat patch_ng.py | grep __version__ | head -1 | awk -F= '{ print $2 }' | sed 's/[ \",]//g')"
- echo "Deploying library version '$PACKAGE_VERSION'"
- echo "Tagged in repo as '$TRAVIS_TAG'"
- |
if [ "$PACKAGE_VERSION" != "$TRAVIS_TAG" ]; then
echo "Library version and tag name mismatch!"
travis_terminate 1
fi

deploy:
provider: pypi
user: __token__
password:
secure: ggKIZjlC4xLtBrWSSc+BR1lA5Y2eV8UcKwew+pwRy5j76PMYc7y+daW8HqaErIx2+aNcyY4Sh8cv3nJ2MntH3ZckmChCmDlXc7/q9gwMmX85f0on/i1LDhakxvtiOM5/FqaH06bIaqy6pEAurcjIVRXNJwgfOFQu86AGTAa92NCOkyBT2Sr9fWyEKN+ONalFPHCOmnXnj0AXYceQ5egV1G75LZnO8wzl6+05lUDUCwh1ooQbNo6flliFc5aRMCFESSjBOps08qZEt+/hromlSzYFtqX1gy3myNeGV/df2+nRs+X45YJjScnEXIcPDE9REbw1nY23r7FadCKPJT8CYOCSJ2e5TvGYvhbHSGGXU4hYZSdldGH9Ub+LaQyTXHvsoyWcQzhkdfAhpqJ3AIX1RKqK4C8B3Fr2lkbkEc7YuoSLXxx4Xg2DikyvqMBafUBzAlbtt5qP+nH9j1LOhe2ntXpo7z2y00zKQV6bC7QCyK2X7wItruW4z5kXXOOB6i/WjUa1XdL/3yYm4LJ5tkLKHUTB0tbwCQhWpymr9ZIiKVL/9WtVl/+erJ6YjxIwhRI+INFhyHAJF8mJI9ywF7y5DREIBfR27VkwDgm+Y0lobGyU+/1bWSxoYq7gzkRvoPoUW1xBMZ4koqDTCO5wBVz79EDCfpfm302kYjMW0NA9m5w=
on:
tags: true