/
.travis.yml
113 lines (98 loc) · 3.86 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
# Travis CI configuration file
# http://about.travis-ci.org/docs/
language: python
python:
- "2.5"
- "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:
exclude:
# Disable not supported Twisted versions on Python 2.5
- python: "2.5"
env: TWISTED=12.2.0 SQLALCHEMY=latest SQLALCHEMY_MIGRATE=0.7.1
- python: "2.5"
env: TWISTED=13.0.0 SQLALCHEMY=latest SQLALCHEMY_MIGRATE=0.7.1
include:
# Test different versions on 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
- git describe
# zope.interface dropped Python 2.5 support in 4.0.0
- "[ $TRAVIS_PYTHON_VERSION != '2.5' ] || pip install 'zope.interface<4.0.0'"
- "[ $TWISTED = latest ] || pip install Twisted==$TWISTED"
- "[ $SQLALCHEMY = latest ] || pip install sqlalchemy==$SQLALCHEMY"
- "[ $SQLALCHEMY_MIGRATE = latest ] || pip install sqlalchemy-migrate==$SQLALCHEMY_MIGRATE"
- (cd master; python setup.py develop)
- (cd slave; python setup.py develop)
- (cd www; python setup.py develop)
# mock is preinstalled on Travis
# txgithub requires Twisted >= 12.3.0, which doesn't work on Python 2.5.
- "[ $TRAVIS_PYTHON_VERSION = '2.5' ] || pip install txgithub"
# Determine is 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;
# Run additional tests only in latest configuration
- "[ $IS_LATEST = false ] || pip install pylint"
- "[ $IS_LATEST = false ] || pip install pyflakes"
- "[ $IS_LATEST = false ] || pip install sphinx"
- "[ $IS_LATEST = false ] || pip install pep8"
# Tests running commands
script:
- trial --reporter=text --rterrors buildbot.test
- trial --reporter=text --rterrors 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"
notifications:
email: false