-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
82 lines (77 loc) · 2.45 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
branches:
only:
- master
stages:
- build
- name: doc
if: type = push
- name: deploy
if: type = push
matrix:
include:
- language: python
stage: build
python: 2.7
install:
- docker pull $DOCKER_AUX_REPO
- sudo cp .ci/protoc /bin/protoc
- sudo chmod +x /bin/protoc
- pip install --upgrade pytest protobuf lz4
script:
- python setup.py build_py
- pytest
- language: python
python: 3.6
install:
- docker pull $DOCKER_AUX_REPO
- sudo cp .ci/protoc /bin/protoc
- sudo chmod +x /bin/protoc
- pip install --upgrade pytest pytest-coverage codecov protobuf lz4
script:
- python setup.py build_py
- pytest --cov=proio --cov-report term-missing
after_success: codecov
- language: python
python: nightly
install:
- docker pull $DOCKER_AUX_REPO
- sudo cp .ci/protoc /bin/protoc
- sudo chmod +x /bin/protoc
- pip install --upgrade pytest protobuf lz4
script:
- python setup.py build_py
- pytest
- language: python
stage: doc
install:
- docker pull $DOCKER_AUX_REPO
- sudo cp .ci/protoc /bin/protoc
- sudo chmod +x /bin/protoc
- pip install --upgrade sphinx pkginfo
script:
- python setup.py build_py sdist
- pip install --upgrade .
- cd docs
- bash genAndDeploy.sh
- language: python
stage: deploy
install:
- docker pull $DOCKER_AUX_REPO
- sudo cp .ci/protoc /bin/protoc
- sudo chmod +x /bin/protoc
- pip install --upgrade protobuf lz4
script:
- sed -i "s/\(version='[0-9]*\.[0-9]*\)'/\1.$TRAVIS_BUILD_NUMBER'/" setup.py
- sed -i "s/'protobuf==[0-9\.*]*'/'$(pip freeze | grep protobuf | sed 's/==/>=/')'/" setup.py
- python setup.py build_py
deploy:
provider: pypi
user: $PYPI_USERNAME
password: $PYPI_PASSWORD
skip_cleanup: true
allow_failures:
- python: nightly
fast_finish: true
sudo: true
services:
- docker