forked from buildbot/buildbot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.bbtravis.yml
221 lines (185 loc) · 7.54 KB
/
.bbtravis.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
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
# BBTravis CI configuration file
language: python
# Available Python versions:
python:
- "2.7"
label_mapping:
TWISTED: tw
SQLALCHEMY: sqla
SQLALCHEMY_MIGRATE: sqlam
latest: l
python: py
TESTS: t
DB_TYPE: db
WORKER_PYTHON: wp
env:
global:
- BUILDBOT_TEST_DB_URL=sqlite://
- HYPER_SIZE=m1
matrix:
# pylint, docs and coverage first as they're more likely to find issues
- TWISTED=latest SQLALCHEMY=latest TESTS=pylint HYPER_SIZE=m3
- TWISTED=latest SQLALCHEMY=latest TESTS=flake8
- TWISTED=latest SQLALCHEMY=latest TESTS=isort
- TWISTED=latest SQLALCHEMY=latest TESTS=docs
- TWISTED=latest SQLALCHEMY=latest TESTS=coverage
# add js tests in separate job. Start it early because it is quite long
- TWISTED=latest SQLALCHEMY=latest TESTS=js HYPER_SIZE=m1
- TWISTED=latest SQLALCHEMY=latest TESTS=smokes HYPER_SIZE=m2
- TWISTED=16.1.0 SQLALCHEMY=latest TESTS=trial
- TWISTED=latest SQLALCHEMY=latest TESTS=trial
- TWISTED=latest SQLALCHEMY=latest TESTS=interop WORKER_PYTHON=3.6
- TWISTED=latest SQLALCHEMY=latest TESTS=interop WORKER_PYTHON=3.4
# 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 DB_TYPE=sqlite
# Configuration that runs tests with real MySQL database (TODO does not work yet with our docker image)
- TWISTED=latest SQLALCHEMY=latest TESTS=trial BUILDBOT_TEST_DB_URL=mysql+mysqldb://[email protected]/bbtest DB_TYPE=mysql
# innodb tests takes 20min probably because of docker aufs.
# travis images provides much faster innodb so we keep these test there until we implement ramfs based
# mysql installation
# - 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
# psycopg2 uses Peer Authentication which is configured in the dockerfile, while pg8000 use md5 auth with dummy password
#- TWISTED=latest SQLALCHEMY=latest TESTS=trial BUILDBOT_TEST_DB_URL=postgresql+psycopg2:///bbtest
#- TWISTED=latest SQLALCHEMY=latest TESTS=trial 'BUILDBOT_TEST_DB_URL=postgresql+pg8000:///bbtest?user=buildbot&password=x'
# Test different versions of SQLAlchemy
- TWISTED=16.1.0 SQLALCHEMY=0.8.0 TESTS=trial
- TWISTED=16.1.0 SQLALCHEMY=latest TESTS=trial
# Tests for the worker on old versions of twisted.
- TWISTED=16.1.0 SQLALCHEMY=latest TESTS=trial_worker
matrix:
fast_finish: true
include:
# python 3 tests
- python: "3.4"
env: TWISTED=latest SQLALCHEMY=latest TESTS=trial
- python: "3.5"
env: TWISTED=latest SQLALCHEMY=latest TESTS=coverage
- python: "3.5"
env: TWISTED=latest SQLALCHEMY=latest TESTS=flake8
- python: "3.5"
env: TWISTED=latest SQLALCHEMY=latest TESTS=smokes HYPER_SIZE=m2
- python: "3.6"
env: TWISTED=latest SQLALCHEMY=latest TESTS=trial
- python: "3.6"
env: TWISTED=latest SQLALCHEMY=latest TESTS=interop WORKER_PYTHON=2.7
- python: "3.7"
env: TWISTED=latest SQLALCHEMY=latest TESTS=trial
- python: "3.7"
env: TWISTED=trunk SQLALCHEMY=latest TESTS=trial
- python: "3.7"
env: TWISTED=latest SQLALCHEMY=latest TESTS=interop WORKER_PYTHON=2.7
# Dependencies installation commands
install:
- pip install -U pip
- condition: TESTS != "smokes"
cmd: pip install -r requirements-ci.txt
- condition: TESTS == "docs"
cmd: pip install -r requirements-cidocs.txt
- condition: '"sqlite" not in BUILDBOT_TEST_DB_URL'
cmd: pip install -r requirements-cidb.txt
- condition: TESTS == "interop"
cmd: |
virtualenv -p python$WORKER_PYTHON /tmp/workerenv
/tmp/workerenv/bin/pip install -e worker
- |
# pip installs for backward compat
set -e
if [ $TWISTED = trunk ]; then
pip install git+https://github.com/twisted/twisted
fi
if [ $TWISTED != latest -a $TWISTED != trunk ]; then pip install Twisted==$TWISTED ; fi
if [ $SQLALCHEMY != latest ]; then pip install sqlalchemy==$SQLALCHEMY; fi
- step: !ShellCommand
command: "pip check"
warnOnFailure: True
flunkOnFailure: False
haltOnFailure: False
name: "pip check"
title: "pip check"
before_script:
# create real database for tests
- condition: '"mysql" in BUILDBOT_TEST_DB_URL'
cmd: sudo /etc/init.d/mysql start
- condition: '"postgresql" in BUILDBOT_TEST_DB_URL'
cmd: |
sudo /etc/init.d/postgresql start
# for pg8000 driver we can't use peer authentication or empty password, so set a dummy password
# This also serves as a way to wait that the database is ready
while ! psql -d bbtest -c 'ALTER USER "buildbot" WITH PASSWORD '"'x'"';' ; do sleep 1 ; done
# Tests running commands
script:
# make frontend_install_tests takes 17 min, so we only do it post submit
- title: frontend tests
condition: TESTS == "js" and TRAVIS_PULL_REQUEST
cmd: make frontend
- title: full frontend tests
condition: TESTS == "js" and not TRAVIS_PULL_REQUEST
cmd: make frontend_install_tests
- title: master and worker tests
condition: TESTS == "trial"
cmd: trial --reporter=text --rterrors buildbot.test buildbot_worker.test
- title: interop tests
condition: TESTS == "interop"
cmd: SANDBOXED_WORKER_PATH=/tmp/workerenv/bin/buildbot-worker coverage run --rcfile=.coveragerc $(which trial) --reporter=text --rterrors buildbot.test.integration.interop
- title: worker tests
condition: TESTS == "trial_worker"
cmd: trial --reporter=text --rterrors buildbot_worker.test
# run tests under coverage for latest only (it's slower..)
- title: coverage tests
condition: TESTS == "coverage"
cmd: coverage run --rcfile=.coveragerc $(which trial) --reporter=text --rterrors buildbot.test buildbot_worker.test
# blacklisting testrunner for new version of py3
- title: py3 tests
condition: TESTS == "py3next"
cmd: python common/run_py3_working_tests.py
# Run additional tests in their separate job
- title: pylint
condition: TESTS == "pylint"
cmd: make pylint
- title: flake8
condition: TESTS == "flake8"
cmd: make flake8
- title: isort
condition: TESTS == "isort"
cmd: isort --check -df `git ls-files |grep '.py$'`
# Build documentation
- title: docs
condition: TESTS == "docs"
cmd: make docs
# Run spell checker on documentation
- title: spelling
condition: TESTS == "docs"
cmd: make -C master/docs SPHINXOPTS=-W spelling
# Runs Sphinx' external link checker only on post submit build (it is too unstable)
- title: linkcheck
condition: TESTS == "docs" and not TRAVIS_PULL_REQUEST
cmd: make -C master/docs SPHINXOPTS=-q linkcheck
- title: maketarballs
condition: TESTS == "smokes"
cmd: make tarballs
- title: protractor tests
condition: TESTS == "smokes"
cmd: ./common/smokedist.sh whl
- title: tarballs protractor tests
condition: TESTS == "smokes" and not TRAVIS_PULL_REQUEST
cmd: ./common/smokedist.sh tar.gz
notifications:
email: false
after_script:
- |
# codecov
if [ $TESTS = coverage ]; then CODECOV_TOKEN="b80c80d7-689d-46d7-b1aa-59168bb4c9a9" codecov; fi
# List installed packages along with their versions.
- "pip list"
sudo: false
branches:
# Only build main-line branches.
only:
- master
- eight
git:
depth: 300