-
Notifications
You must be signed in to change notification settings - Fork 6
/
.travis.yml
94 lines (92 loc) · 4.44 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
language: python
os: linux
dist: xenial
stages:
- lint
- test
- deploy
python:
- "3.5"
- "3.6"
- "3.7"
- "3.8"
env:
global:
- THIS_REPO="${TRAVIS_REPO_SLUG#*/}"
- OWNER=YakDriver
- RELEASE_VERSION=$(grep -E '^current_version' $TRAVIS_BUILD_DIR/.bumpversion.cfg | sed 's/^.*= //')
- PRIOR_VERSION=$(git describe --abbrev=0 --tags)
cache: pip
before_cache:
- rm -f $HOME/.cache/pip/log/debug.log
install:
- pip install -r requirements/pip.txt
- pip install -r requirements/test.txt
- pip install --editable .
script:
- pytest
jobs:
include:
- stage: lint
python: 3.6
install:
- pip install -r requirements/pip.txt
- pip install -r requirements/lint.txt
- pip install --editable .
script:
- pylint oschmod
- pylint tests/*py
- flake8
- stage: deploy
python: 3.6
env:
- JOB="Deploy to PyPI"
install: skip
script:
- |
if [ "$TRAVIS_TAG" = "" ]; then
ver=$(git show -s --format=%cd --date=format:'%Y%m%d%H%M%S')
sed -i -E "s/^(version = )([0-9]+\.[0-9]+\.[0-9]+).*$/\1\2.dev$ver/" setup.cfg
fi
deploy:
- provider: pypi
server: https://test.pypi.org/legacy/
distributions: sdist bdist_wheel
username: __token__
password:
secure: "m3K/C6HINvSihnKJvkZ/ue2f+RqBhRIuZjkN8gbWcs+GpOdPazA0FMDjAz7sAzh5+n3ChKvNeA1VzEZQ2x6qNLi8xMdp+J1evC5RA7ag/lZ8F5YVvzz4XRsyAjxmIDvtM3K+6C49U7fP7+TmDk6h6+DDIIVYkU0O6eZhxqttuoqOs5xrUhKcKhnt8tt4kU//zaU6OLVuPQ5MdMCPTc9Fi9LQefXh0ZGYd2JafkxdsmyPySLcJwSeOs0k/31UIcuX1tspMCsD9RrXAFQqbdOohUl2iS+NdB/T1Ph09/XmMk06KmAaut5cA9RBxAYBH9GKF0QdhBQC0QZVe54/eyWfmXRUhTuXy4X2EXq2cPS1AJhf0b8HOgFruGqHtb2IiL2iCfw21NojGHp77BtFegsFBYDwIwcN6Vj0Kk99madwliUwY2pIhcj/4uYLw6qqX8r13dBHyElrD2zjOPcFXlYMo4YygI7qyaL4V+HIWl133Sq6oJVzz0U1pP93VOq2Lj4HSrLrqugIxjIwvfiKMFgiLxHVvioSMOTRwuo60YKMivZGcHXiW4OpPijAxNqpyte6zK9y1+P8FAXwfe/sS7KsZPfSuTT9YiPvKqchZYZLLI0RnYoDxvn4M1ZDxQSt5IATnGgA54Sva1fV3x2u5TUBvxZkZcV1ah1NaPC8mZyMmaw="
cleanup: false
upload_docs: false
on:
branch: main
- provider: pypi
distributions: sdist bdist_wheel
username: __token__
password:
secure: "bCxmyUGMybtgQPJufwT0A5Y/dQrqRzuCMRfsTLKDJRVldgnu6sP07MdpXqQcjyMxNCPJu8PWMddm3ydwj6hS7ID3ntP7ADUPdUAyl0IwVKdCqAjQlI+EdNhYnHtBXyOSuju6Nl4u9gjtNfzsedkqp/03KsN2PZDIgjoyg0b4Rs+JxFgsCzAtzMiJhv9C33kMOKE4goZik3K5RJ8bfxsvrvt38vAS+l2GAyw4A5ur9LqD9/b6NzoZdheP2/dqnlBkycw+cpk0BXx9S6apRMfhlRxv28u992LeA2XYeWvgifEzP8kYdme/vAhzLMkqCdBGPpkOKtmSLLHTuDKt18AIwsH0FxPUUm6mO5Uhpl76d/d8SVxHXI9IvG/jn2hI5kPhtZ1fQ/JMLo7FHoN/ZtdIUe2ffiFT+ialw0WYlDSj3JeODxd2SeN/QGM9FJ0f57QYzXNkmTpXhcc6qQ7aKh1J7NZn6mIm8xYdBnRqm/c1T9nAsfG3Bzk/7GqTs2IUUQPfS0PNc7XcSDA3KIXwQta3yY28MtOFBnh7dWzOOC0tleyngulJGAXKJVD+MiS+MtAwlU8IWlYqYufsXbV5c5+UcMR2L6WThRDT4YfIRvtiLILyaWrmAk0mzoeqGQ0lLUonYDkIk/f630nWAt2wifg8oxVLRQV/fgjdW+UqnqcI2v4="
upload_docs: false
on:
tags: true
- stage: deploy
if: branch = main AND tag IS blank
python: 3.6
install: skip
script:
- export RELEASE_BODY="* [$THIS_REPO v$RELEASE_VERSION CHANGELOG](https://github.com/$OWNER/$THIS_REPO/compare/$PRIOR_VERSION...$RELEASE_VERSION)"
- echo RELEASE_BODY=$RELEASE_BODY
- env
- echo PRIOR_VERSION=$PRIOR_VERSION
- echo RELEASE_VERSION=$RELEASE_VERSION
deploy:
- provider: releases
name: $RELEASE_VERSION
tag_name: $RELEASE_VERSION
target_commitish: $TRAVIS_COMMIT
release_notes: $RELEASE_BODY
draft: false
cleanup: false
token:
secure: "Sm1sNSVGUFDb+bZjNvIiH65r28Y83q2invQop9qW2iSDQaEiOLQT7JKzeSUZJxjzq824aK2aU8se9f8wkKwlTaVGjou5tCRUncsPf8biFKgJSUKl0SEYCJ3Dzff8xi+Mk2bOOUo3VgnDTKdNtQ62dzJOrI2mLZ7dymSf8e5LBHjbSNzVPE+KOm7/8LERgyO7hGbuU8AYK2ixZI7Ltm2MYFu88KH2o31wQPflNmCqpIqNP8IrE1tW//IcLKrvArrC0N4nOD8/I8bvb2uLVsaolruC+P+ohlIuksfeqB4XXQxRuNHZDJU9QExrhY3gzZOGm5B8ucj71H56W/3DgD0RV9pT0BAWynHUhtSCCLI4MCaTVq2jAVkjgnpO1rzbauYoXHQenZZNoyJ+l6bHF2Uz9oC8IwtEe6EiJ1TwnFHMvWtG3PVm4d9xuirl1E+xKi4mYQ/WwnNmOcYEGxtLIeduV51bqZYi3CxADxv51+KOpDJMSv3+eQcnUgtGozNqCFzaL2Lnl1RYWQLTAHBBxXl91tprunsno5usMok8sGz5JJ7f/+U53gTZitzpXYS6qTyGcZbde6HOAH/vJzpoI32VbaLWfNrcTwFpVVehFYPW6hdUgmCTGehGCqWkRtMdJkyt3MhJ0PRco0lU0YQ77ZO/6Yqv+Rg8g0iJQYIr5QG3KeY="
on:
branch: main
condition: '"$PRIOR_VERSION" != "$RELEASE_VERSION"'