-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy path.travis.yml
117 lines (93 loc) · 2.28 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
116
117
sudo: false
dist: trusty
language: python
python:
- "3.6"
services:
- docker
cache:
directories:
- $HOME/.cache/pip
before_install:
- export PATH=$PATH:$HOME/.local/bin
# build ID (eg, "20180513-28114a1")
- export TXAIOETCD_BUILD_ID="$(date --utc "+%Y%m%d")-$(git rev-parse --short ${TRAVIS_COMMIT})"
install:
- pip install tox codecov
- if [[ $(git diff --name-only $TRAVIS_COMMIT_RANGE) =~ "docker/Dockerfile" ]]; then docker build -t crossbario/txaio-etcd -f ./docker/Dockerfile .; fi
before_script:
- docker run -d -p 2379:2379 -p 2380:2380 -v /usr/share/ca-certificates/:/etc/ssl/certs --name etcd-node quay.io/coreos/etcd:latest /usr/local/bin/etcd --name etcd-node --advertise-client-urls http://0.0.0.0:2379 --listen-client-urls http://0.0.0.0:2379
script:
- tox -c tox.ini -e $TOX_ENV
#- examples/run.sh
#- docker run --rm -it --link etcd --env ETCD_URL=http://etcd-node:2379 crossbario/txaio-etcd"
after_success:
# since we use --parallel-mode to coverage inside Tox we use
# "coverage combine" so the filename is always ".coverage"
- coverage combine && codecov
matrix:
fast_finish: true
include:
#
# General
#
- python: 3.6
env:
- TOX_ENV=flake8
- python: 3.6
env:
- TOX_ENV=mypy
- python: 3.6
env:
- TOX_ENV=yapf
#
# Docs
#
- python: 3.6
env:
- TOX_ENV=sphinx
#
# CPython 3.7
#
- python: 3.7
dist: xenial
sudo: required
env:
- TOX_ENV=py37
#
# CPython 3.6 - 2.7
#
- python: 3.6
env:
- TOX_ENV=py36
- python: 3.5
env:
- TOX_ENV=py35
- python: 3.4
env:
- TOX_ENV=py34
- python: 2.7
env:
- TOX_ENV=py27
#
# PyPy
#
- python: pypy3
env:
- TOX_ENV=pypy3
- python: pypy
env:
- TOX_ENV=pypy
# https://docs.travis-ci.com/user/build-stages/matrix-expansion/
- stage: deploy
python: "3.7"
dist: xenial
sudo: required
if: repo = crossbario/txaio-etcd AND branch = master AND type != pull_request
#on:
# repo: crossbario/txaio-etcd
# branch: master
# # tags: true
skip_cleanup: true
provider: script
script: pwd && ls -la && sh .travis-deploy.sh