-
Notifications
You must be signed in to change notification settings - Fork 3
/
.travis.yml
115 lines (113 loc) · 5.11 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
language: python
stages:
- lint
- test
- deploy
python:
- "3.5"
- "3.6"
env:
global:
- THIS_REPO="${TRAVIS_REPO_SLUG#*/}"
- OWNER=YakDriver
- RELEASE_BRANCH=main
- RELEASE_VERSION=$(grep -E '^current_version' $TRAVIS_BUILD_DIR/.bumpversion.cfg | sed 's/^.*= //')
- PRIOR_VERSION=$(git describe --abbrev=0 --tags)
stage: test
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 scratchrelaxtv
- pylint tests/*py
- flake8
- stage: test
python: 3.7
dist: xenial
- stage: test
os: osx
osx_image: xcode10.1
language: sh
python: 3.7
# Perform the manual steps on osx to install python3 and activate venv
before_install:
- python -m pip install -r requirements/ci.txt
- virtualenv $HOME/venv -p python3
- source $HOME/venv/bin/activate
cache:
directories:
- $HOME/Library/Caches/Homebrew
- /usr/local/Homebrew/Library/Homebrew
- /usr/local/Homebrew/Library/Taps
- $HOME/.cache/pip
- stage: deploy
if: branch = env(RELEASE_BRANCH) AND type != pull_request
python: 3.6
env:
- JOB="Deploy to Test PyPI"
install: skip
script:
- sed -i -E "s/^(version = )(.*)/\1\2.$TRAVIS_BUILD_NUMBER/" $TRAVIS_BUILD_DIR/setup.cfg
deploy:
- provider: pypi
server: https://test.pypi.org/legacy/
distributions: sdist bdist_wheel
user: YakDriver
password:
secure: u+RfrxXyzG+n0+Tain08vQOyVldQnYntp7QMfL4iW5WcVLavaih5lCIlF4aq8y7Tn6cDr+6Z6dyE+eqqVfNZ1j1u68mS8rp1e0dQfD+ajm1GIR+HT58+BkkD1KUUIZGLNPBovPR6x6c+VNtmdztAVPU/mY9c6jaGr5aMA8fWIvQC1HaV5j5T8RsIEzj6v99ET/8P+M1zO9S1fu78wyKGE9cIFfQPCnBYhPqEzPnb1zdS+P6G9bF6JrwAZFJicyKSvPk+oH2ds7s4Yuifsrsr9V9eaSpw9RIYHjheNwtUGCt9AH0TIj/qOSMR3+YWoHkS1SNMhRCHzoDn5O53lTNMz0eNpF9CyeEc7jmyK2WHb+PQhOUaiihbQJ85HaITqeh3pLqwV3fVnMMP1EE7cZCAejWeKQaQMKIydV3bUP4mNQxKLmcwrQmCuZ2Zx7b5YB9KcAjCp6hXnHwJq+uFGE8GAZWJN4XyJkrKb20DvQiblnhyoZU/1VqeVM6TRY9nW/EwrgFj5R3803U7BEyv9pP4/K/opctgIMLSY3sVAzLzuwoydcqxIbCAtGmsGI3n4lp846yeyDP5pegAD2wHkSMGxUJ2hut8fDVQKRtr9pMOoEr8zTSv0sVvssKIPQr+x6VwqLh+FlnobN2S/xSfsMnaGi053qzR5Rf2ucLHgYRAAWU=
skip_cleanup: true
skip_upload_docs: true
on:
branch: $RELEASE_BRANCH
- stage: deploy
if: branch = env(RELEASE_BRANCH) AND type != pull_request
python: 3.6
env:
- JOB="Deploy to GitHub Releases"
- RELEASE_BODY="* [$THIS_REPO v$RELEASE_VERSION CHANGELOG](https://github.com/$OWNER/$THIS_REPO/compare/$PRIOR_VERSION...$RELEASE_VERSION)"
install: skip
script:
- echo RELEASE_BODY=$RELEASE_BODY
deploy:
- provider: releases
name: $RELEASE_VERSION
tag_name: $RELEASE_VERSION
target_commitish: $TRAVIS_COMMIT
body: $RELEASE_BODY
draft: false
skip_cleanup: true
api_key:
secure: JC/sChlxp6h74BjC5DBEq7qJd5hS18DrHNw27D0ISRYDsXk81LHRG3Sl9aRHu1E3drM+rhCXbo3eUwwUGzKdTlUIPX2Vyhouny03E0ZIyu9A7DqDCjOM6nfN5uVrVrOo5flCHy3cY1Pl6P24RjXz6AEuiS29USS70XfaX7Mks83qC9UBBNk29ClJzlMVWu+XPiLkxzubZqj3Z5t5tysfTDxLvifbVOfvX9Znexiy++KTlUFNkUH+sKY0oIeM7PkhH7tRG1Uy3gNV9ZfxAEZV90iG8o0R2fqYCTxJrsc1wgQtV1ygQu8utF9SDGW+k7uJM6/O+5RtgENEVfAK4otnzOsYrPe25WUd9v/chTAuolfZUCEwC/hDkfnn3B4m3AhLCznK9c/EBQ6k5B6iDm5Yjd/DL76Bn5n+zdZdwoJxVWik1WHHufQFFUzKccW0Gn0qV7M6FeM8O/4LYuzl5PH5wAmtnYsv1ZLc7Qx1Eo1N3Nc2miGDhARgbdc6DWQTqA3cLXD22MLsfGoWZmZmHCWkF9+UMkzeFSBplUYho4VuKuMmwwf4xJol3ZsqB4l5HBjU1C4bLCmrNweYFc+pxYRwJ83ZbqsQbOxpEfnN7KjLoPfW1MzkwDHEpWbnUUF2DsapJTvvGx1lC9KHJP4XnsI3QkThIKGJbfut0gIhFepxwrU=
on:
branch: $RELEASE_BRANCH
condition: '"$PRIOR_VERSION" != "$RELEASE_VERSION"'
- stage: deploy
if: tag is present
python: 3.6
env:
- JOB="Deploy to PyPI"
install: skip
script: skip
deploy:
- provider: pypi
distributions: sdist bdist_wheel
user: YakDriver
password:
secure: Kw7C2qVkpEne0JGt/Sg3Yuv13smo5UJAjdpwDdFPXGRTSv0eMllWu30hDINiJUpHrQPzjZtl6wZ3EvEu5ghjYlZDtGHdY7TqksVCkUEWixHnRBCVAT0yPTlk/H9VO+Kf/BUck6FTxCVXtOQijsvGizDsqpkJ2ZJmZLu9vgBOOAjNfdszDSma6sT24XQN5p8CKXiu/nH88FyRmd5OMNTKXApwg+CeNsI3vxc7ug+gr4jBvGXpv2cb4pFIQ2F2H3NwhrxBdwvo78OOx46q8a7TiLwsY54/8fdmuw+J6sinQz60ceNKDx6tPFJioOuK7yBZAFDMX31NQEmiXWQTof6JwV7SLcpasVi4jimuBYtQNX/uGaCGIQ5dSUcQ7tRPd1zLuyox1RTYcLFYTt+bSxehVtbysnF1PHtSSPCdGFVgPQi934YFw+UC1j+lRQ2+HjQQyM1o6MquZuanMnsvxEShHtkLUnwhyWmz7eOp/1wUt0oOpOPAPKRjsO/CnYfc5DjyJ6H/Pjlsielk7PRlgCyInJ4Pph8dZVwTkPuTVn7Qp3SCoZ11tJsbdSAkczX6O8RtTe+MOVL3PBazqzzZDNKJmvlF0Y6Vwsr3+ZRXK5oag/l+L9wqrYuIsR4t2NYB+0HVwXzr22r9C/rsGlX+pSK4fazjmjEASkygPh+JB7J72os=
skip_upload_docs: true
on:
tags: true