forked from buildbot/buildbot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
120 lines (105 loc) · 4.78 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
118
119
120
# Travis CI configuration file
# http://about.travis-ci.org/docs/
language: python
# Available Python versions:
# http://about.travis-ci.org/docs/user/ci-environment/#Python-VM-images
python:
# "2.5" -- not supported by Travis CI anymore
- "2.6"
- "2.7"
env:
- TWISTED=11.1.0 SQLALCHEMY=latest SQLALCHEMY_MIGRATE=0.7.1
- TWISTED=12.2.0 SQLALCHEMY=latest SQLALCHEMY_MIGRATE=0.7.1
- TWISTED=13.0.0 SQLALCHEMY=latest SQLALCHEMY_MIGRATE=0.7.1
- TWISTED=latest SQLALCHEMY=latest SQLALCHEMY_MIGRATE=latest
matrix:
include:
# Test different versions of SQLAlchemy
- python: "2.7"
env: TWISTED=12.0.0 SQLALCHEMY=0.6.0 SQLALCHEMY_MIGRATE=0.7.1
- python: "2.7"
env: TWISTED=12.0.0 SQLALCHEMY=0.6.8 SQLALCHEMY_MIGRATE=0.7.1
- python: "2.7"
env: TWISTED=12.0.0 SQLALCHEMY=0.7.0 SQLALCHEMY_MIGRATE=0.7.1
- python: "2.7"
env: TWISTED=12.0.0 SQLALCHEMY=0.7.4 SQLALCHEMY_MIGRATE=0.7.1
- python: "2.7"
env: TWISTED=12.0.0 SQLALCHEMY=0.7.8 SQLALCHEMY_MIGRATE=0.7.1
- python: "2.7"
env: TWISTED=12.0.0 SQLALCHEMY=latest SQLALCHEMY_MIGRATE=0.6.1
# Test different versions of SQLAlchemy-migrate
- python: "2.7"
env: TWISTED=12.0.0 SQLALCHEMY=latest SQLALCHEMY_MIGRATE=0.6.1
- python: "2.7"
env: TWISTED=12.0.0 SQLALCHEMY=latest SQLALCHEMY_MIGRATE=0.7.1
- python: "2.7"
env: TWISTED=12.0.0 SQLALCHEMY=latest SQLALCHEMY_MIGRATE=0.7.2
before_install:
# Disable SSH host key checking. Otherwize ssh will ask confirmation from
# command prompt.
- echo -e "Host github.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
# Install fresh Node.js from PPA
- sudo add-apt-repository -y ppa:chris-lea/node.js
- sudo apt-get update -qq
- sudo apt-get install -qq nodejs
# Dependencies installation commands
install:
# Fetch objects and tags from upstream git repository.
# Required for proper work of `git describe`.
- git describe || true
- git remote add upstream git://github.com/buildbot/buildbot.git
- git fetch upstream --tags
- git fetch origin --tags
- |
DEPTH=300;
while [ "$(git describe 2> /dev/null)" == "" ]; do
DEPTH=$(($DEPTH+200));
git fetch origin --depth=$DEPTH --quiet;
done
# Determine if current configuration is latest
- |
if [[ $TRAVIS_PYTHON_VERSION == '2.7' && $TWISTED == latest && \
$SQLALCHEMY = latest && $SQLALCHEMY_MIGRATE = latest ]]; then
export IS_LATEST=true
else
export IS_LATEST=false
fi;
# coveralls is the interface to coveralls.io; see after_success
- "echo 'travis_fold:start:coveralls'; pip install coveralls; echo 'travis_fold:end:coveralls'"
- "echo 'travis_fold:start:tw'; [ $TWISTED = latest ] || pip install Twisted==$TWISTED; echo 'travis_fold:end:tw'"
- "echo 'travis_fold:start:sa'; [ $SQLALCHEMY = latest ] || pip install sqlalchemy==$SQLALCHEMY; echo 'travis_fold:end:sa'"
- "echo 'travis_fold:start:sam'; [ $SQLALCHEMY_MIGRATE = latest ] || pip install sqlalchemy-migrate==$SQLALCHEMY_MIGRATE; echo 'travis_fold:end:sam'"
- (cd pkg; python setup.py develop)
- (cd master; python setup.py develop)
- (cd slave; python setup.py develop)
# mock is preinstalled on Travis
# txrequests support only Python 2.6 and 2.7.
- pip install txrequests
# Run additional tests only in latest configuration
# txgithub requires Twisted >= 12.3.0, so we install it only when we test the
# latest Twisted to avoid unintended upgrades.
# deps of txgithub cryptography requires python 2.7, so we only install txgithub for 2.7
- "[ $IS_LATEST = false ] || pip install txgithub"
# Astroid 1.3.0 dropped Python-2.6 spuport
- "[ $IS_LATEST = false ] || pip install 'astroid<1.3.0'"
# Note pylint version is pinned because newer versions can't import zope.interface - http://www.logilab.org/92792
- "[ $IS_LATEST = false ] || pip install pylint==1.1.0"
- "[ $IS_LATEST = false ] || pip install pyflakes"
- "[ $IS_LATEST = false ] || pip install sphinx"
- "[ $IS_LATEST = false ] || pip install pep8==1.5.7"
# Tests running commands
script:
- "[ $IS_LATEST = false ] || make frontend_install_tests"
# run tests under coverage for latest only (it's slower..)
- "[ $IS_LATEST = true ] || trial --reporter=text --rterrors buildbot.test buildslave.test"
- "[ $IS_LATEST = false ] || coverage run --rcfile=.coveragerc $(which trial) --reporter=text --rterrors buildbot.test buildslave.test"
# Run additional tests only in latest configuration
- "[ $IS_LATEST = false ] || make pylint"
- "[ $IS_LATEST = false ] || make pyflakes"
- "[ $IS_LATEST = false ] || make docs"
- "[ $IS_LATEST = false ] || make pep8"
- "echo 'travis_fold:start:piplist'; pip list; echo 'travis_fold:end:piplist'"
notifications:
email: false
after_success:
- "[ $IS_LATEST = false ] || coveralls"