forked from buildbot/buildbot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
177 lines (154 loc) · 6.88 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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
# Travis CI configuration file
# http://about.travis-ci.org/docs/
addons:
postgresql: "9.4"
services:
- mysql
- postgresql
language: python
# Available Python versions:
# http://about.travis-ci.org/docs/user/ci-environment/#Python-VM-images
python:
- "2.6"
- "2.7"
env:
- TWISTED=12.2.0 SQLALCHEMY=latest TESTS=trial
- TWISTED=13.0.0 SQLALCHEMY=latest TESTS=trial
- TWISTED=15.4.0 SQLALCHEMY=latest TESTS=trial
- TWISTED=latest SQLALCHEMY=latest TESTS=trial
# Configuration when SQLite database is persistent between running tests
# (by default in other tests in-memory SQLite database is used which is
# recreated for each test).
# Helps to detect issues with incorrect database setup/cleanup in tests.
- TWISTED=latest SQLALCHEMY=latest TESTS=trial BUILDBOT_TEST_DB_URL=sqlite:////tmp/test_db.sqlite
# Configuration that runs tests with real MySQL database
- TWISTED=latest SQLALCHEMY=latest TESTS=trial BUILDBOT_TEST_DB_URL=mysql+mysqldb://[email protected]/bbtest
- TWISTED=latest SQLALCHEMY=latest TESTS=trial BUILDBOT_TEST_DB_URL=mysql+mysqldb://[email protected]/bbtest&storage_engine=InnoDB
# Configuration that runs tests with real PostgreSQL database with pg8000 and psycopg2 drivers
- TWISTED=latest SQLALCHEMY=latest TESTS=trial BUILDBOT_TEST_DB_URL=postgresql+psycopg2:///bbtest?user=postgres
- TWISTED=latest SQLALCHEMY=latest TESTS=trial BUILDBOT_TEST_DB_URL=postgresql+pg8000:///bbtest?user=postgres
cache:
directories:
- $HOME/.cache/pip
- www/base/node_modules
- www/codeparameter/node_modules
- www/console_view/node_modules
- www/waterfall_view/node_modules
- www/nestedexample/node_modules
- www/base/libs
- www/codeparameter/libs
- www/console_view/libs
- www/waterfall_view/libs
- www/nestedexample/libs
matrix:
include:
# Test different versions of SQLAlchemy
- python: "2.7"
env: TWISTED=15.5.0 SQLALCHEMY=0.6.0 TESTS=trial
- python: "2.7"
env: TWISTED=15.5.0 SQLALCHEMY=0.6.8 TESTS=trial
- python: "2.7"
env: TWISTED=15.5.0 SQLALCHEMY=0.7.0 TESTS=trial
- python: "2.7"
env: TWISTED=15.5.0 SQLALCHEMY=0.7.4 TESTS=trial
- python: "2.7"
env: TWISTED=15.5.0 SQLALCHEMY=0.7.8 TESTS=trial
- python: "2.7"
env: TWISTED=15.5.0 SQLALCHEMY=latest TESTS=trial
# add extra tests in separate jobs
- python: "2.7"
env: TWISTED=latest SQLALCHEMY=latest TESTS=coverage
- python: "2.7"
env: TWISTED=latest SQLALCHEMY=latest TESTS=lint
- python: "2.7"
env: TWISTED=latest SQLALCHEMY=latest TESTS=js
- python: "2.7"
env: TWISTED=latest SQLALCHEMY=latest TESTS=docs
# python 3 tests
# - python: "3.4"
# env: TWISTED=latest SQLALCHEMY=latest TESTS=py3
# Configuration to run `python setup.py test` to check this test runner.
- python: "2.7"
env: TWISTED=latest SQLALCHEMY=latest TESTS=setuppy_test
# Dependencies installation commands
install:
# codecov is the interface to codecov.io; see after_success
- "echo 'travis_fold:start:codecov'; pip install codecov; echo 'travis_fold:end:codecov'"
- "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'"
# mock is preinstalled on Travis
# Install lz4 for log compression utest
# Install python-future for py2/3 compatability
# Install pyjade for custom templates tests
# Install MySQL-python for tests that uses real MySQL
# Install psycopg2 and pg8000 for tests that uses real PostgreSQL
# Install boto and moto for running EC2 tests
# Install txgithub to run buildbot.status.github module tests
- |
[ $TESTS != trial -a $TESTS != coverage -a $TESTS != lint -a $TESTS != js ] || \
pip install -e pkg \
-e master[tls] \
-e slave \
-e worker \
txrequests \
future \
pyjade \
lz4 \
MySQL-python \
psycopg2 \
pg8000 \
boto \
moto \
txgithub
# install buildbot_www from pip in order to run the www tests
- "[ $TESTS != trial -a $TESTS != coverage ] || pip install --pre buildbot_www"
# for python 3 we dont install everything yet..
- |
[ $TESTS != py3 ] || \
pip install -e slave \
-e worker \
future
# Run additional tests only in latest configuration
# Astroid 1.3.0 dropped Python-2.6 spuport
- "[ $TRAVIS_PYTHON_VERSION != 2.7 ] || pip install 'astroid<1.3.0'"
# Note pylint version is pinned because newer versions can't import zope.interface - http://www.logilab.org/92792
# astroid > 1.4 is incompatible with pylint 1.1.0
- "[ $TESTS != lint ] || pip install pylint==1.1.0 pep8==1.5.7 flake8 astroid==1.3.8"
# Install sphinx so that pylint will be able to import it
- "[ $TESTS != lint ] || pip install sphinx==1.3.3"
# Install docs dependencies for running the tests
- "[ $TESTS != docs ] || pip install -e ./master[docs]"
# Check that Twisted is not installed during previous steps on setuppy_test configuration.
# In setuppy_test all dependencies should be installed by setuptools during tests.
- "[ $TESTS != setuppy_test ] || ! (pip list | grep Twisted)"
# Automatic installation of autobahn during `setup.py test` fails due to:
# https://bitbucket.org/pypa/setuptools/issues/500/when-directorysandbox-is-active-isinstance
- "[ $TESTS != setuppy_test ] || pip install autobahn"
before_script:
# create real MySQL database for tests
- mysql -e 'create database bbtest;'
# create real PostgreSQL database for tests
- psql -c 'create database bbtest;' -U postgres
# Tests running commands
script:
- "[ $TESTS != js ] || make frontend_install_tests"
# run tests under coverage for latest only (it's slower..)
- "[ $TESTS != trial ] || trial --reporter=text --rterrors buildbot.test buildslave.test buildbot_worker.test"
- "[ $TESTS != coverage ] || coverage run --rcfile=.coveragerc $(which trial) --reporter=text --rterrors buildbot.test buildslave.test buildbot_worker.test"
# run tests that are know to work on py3
- "[ $TESTS != py3 ] || trial --reporter=text --rterrors buildslave.test buildbot_worker.test"
# Run additional tests in their separate job
- "[ $TESTS != lint ] || make pylint"
- "[ $TESTS != lint ] || make flake8"
- "[ $TESTS != docs ] || make docs"
- "[ $TESTS != setuppy_test ] || (cd master; python setup.py test)"
- "[ $TESTS != setuppy_test ] || (cd slave; python setup.py test)"
- "[ $TESTS != setuppy_test ] || (cd worker; python setup.py test)"
- "echo 'travis_fold:start:piplist'; pip list; echo 'travis_fold:end:piplist'"
notifications:
email: false
after_success:
- "[ $TESTS != coverage ] || codecov"
sudo: false
git:
depth: 300