forked from datastax/python-driver
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.yaml
216 lines (187 loc) · 7.52 KB
/
build.yaml
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
schedules:
commit_master:
schedule: per_commit
branches:
include: [master]
env_vars: |
EVENT_LOOP_MANAGER='libev'
EXCLUDE_LONG=1
matrix:
exclude:
- python: [3.4, 3.6, 3.7]
nightly_master:
schedule: nightly
branches:
include: [master]
env_vars: |
EVENT_LOOP_MANAGER='libev'
matrix:
exclude:
- python: [3.4, 3.6, 3.7]
commit_long_test:
schedule: per_commit
branches:
include: [/long-python.*/]
env_vars: |
EVENT_LOOP_MANAGER='libev'
matrix:
exclude:
- python: [3.4, 3.6, 3.7]
- cassandra: ['2.0', '2.1', '3.0']
commit_branches:
schedule: per_commit
branches:
include: [/python.*/]
env_vars: |
EVENT_LOOP_MANAGER='libev'
EXCLUDE_LONG=1
matrix:
exclude:
- python: [3.4, 3.6, 3.7]
- cassandra: ['2.0', '2.1', '3.0']
commit_branches_dev:
schedule: per_commit
branches:
include: [/dev-python.*/]
env_vars: |
EVENT_LOOP_MANAGER='libev'
EXCLUDE_LONG=1
matrix:
exclude:
- python: [2.7, 3.4, 3.6, 3.7]
- cassandra: ['2.0', '2.1', '2.2', '3.0', 'test-dse']
release_test:
schedule: per_commit
branches:
include: [/release-.+/]
env_vars: |
EVENT_LOOP_MANAGER='libev'
weekly_libev:
schedule: 0 10 * * 6
branches:
include: [master]
env_vars: |
EVENT_LOOP_MANAGER='libev'
weekly_gevent:
schedule: 0 14 * * 6
branches:
include: [master]
env_vars: |
EVENT_LOOP_MANAGER='gevent'
matrix:
exclude:
- python: [3.4, 3.5, 3.6, 3.7]
weekly_eventlet:
schedule: 0 18 * * 6
branches:
include: [master]
env_vars: |
EVENT_LOOP_MANAGER='eventlet'
weekly_asyncio:
schedule: 0 22 * * 6
branches:
include: [master]
env_vars: |
EVENT_LOOP_MANAGER='asyncio'
matrix:
exclude:
- python: [2.7]
weekly_async:
schedule: 0 10 * * 7
branches:
include: [master]
env_vars: |
EVENT_LOOP_MANAGER='asyncore'
weekly_twister:
schedule: 0 14 * * 7
branches:
include: [master]
env_vars: |
EVENT_LOOP_MANAGER='twisted'
upgrade_tests:
schedule: adhoc
branches:
include: [master, python-546]
env_vars: |
EVENT_LOOP_MANAGER='libev'
JUST_UPGRADE=True
matrix:
exclude:
- python: [3.4, 3.6, 3.7]
- cassandra: ['2.0', '2.1', '2.2', '3.0', 'test-dse']
python:
- 2.7
- 3.4
- 3.5
- 3.6
- 3.7
os:
- ubuntu/bionic64/python-driver
cassandra:
- '2.1'
- '2.2'
- '3.0'
- '3.11'
- 'test-dse'
env:
CYTHON:
- CYTHON
- NO_CYTHON
build:
- script: |
export JAVA_HOME=$CCM_JAVA_HOME
export PATH=$JAVA_HOME/bin:$PATH
export PYTHONPATH=""
# Install latest setuptools
pip install --upgrade pip
pip install -U setuptools
pip install git+ssh://[email protected]/riptano/ccm-private.git
pip install -r test-requirements.txt
pip install nose-ignore-docstring
pip install nose-exclude
pip install service_identity
FORCE_CYTHON=False
if [[ $CYTHON == 'CYTHON' ]]; then
FORCE_CYTHON=True
pip install cython
pip install numpy
# Install the driver & compile C extensions
python setup.py build_ext --inplace
else
# Install the driver & compile C extensions with no cython
python setup.py build_ext --inplace --no-cython
fi
echo "JUST_UPGRADE: $JUST_UPGRADE"
if [[ $JUST_UPGRADE == 'True' ]]; then
EVENT_LOOP_MANAGER=$EVENT_LOOP_MANAGER VERIFY_CYTHON=$FORCE_CYTHON nosetests -s -v --logging-format="[%(levelname)s] %(asctime)s %(thread)d: %(message)s" --with-ignore-docstrings --with-xunit --xunit-file=upgrade_results.xml tests/integration/upgrade || true
exit 0
fi
if [[ $CCM_IS_DSE == 'true' ]]; then
# We only use a DSE version for unreleased DSE versions, so we only need to run the smoke tests here
echo "CCM_IS_DSE: $CCM_IS_DSE"
echo "==========RUNNING SMOKE TESTS==========="
EVENT_LOOP_MANAGER=$EVENT_LOOP_MANAGER CCM_ARGS="$CCM_ARGS" CASSANDRA_VERSION=$CCM_CASSANDRA_VERSION DSE_VERSION='6.7.0' MAPPED_CASSANDRA_VERSION=$MAPPED_CASSANDRA_VERSION VERIFY_CYTHON=$FORCE_CYTHON nosetests -s -v --logging-format="[%(levelname)s] %(asctime)s %(thread)d: %(message)s" --with-ignore-docstrings --with-xunit --xunit-file=standard_results.xml tests/integration/standard/test_dse.py || true
exit 0
fi
# Run the unit tests, this is not done in travis because
# it takes too much time for the whole matrix to build with cython
if [[ $CYTHON == 'CYTHON' ]]; then
EVENT_LOOP_MANAGER=$EVENT_LOOP_MANAGER VERIFY_CYTHON=1 nosetests -s -v --logging-format="[%(levelname)s] %(asctime)s %(thread)d: %(message)s" --with-ignore-docstrings --with-xunit --xunit-file=unit_results.xml tests/unit/ || true
EVENT_LOOP_MANAGER=eventlet VERIFY_CYTHON=1 nosetests -s -v --logging-format="[%(levelname)s] %(asctime)s %(thread)d: %(message)s" --with-ignore-docstrings --with-xunit --xunit-file=unit_eventlet_results.xml tests/unit/io/test_eventletreactor.py || true
EVENT_LOOP_MANAGER=gevent VERIFY_CYTHON=1 nosetests -s -v --logging-format="[%(levelname)s] %(asctime)s %(thread)d: %(message)s" --with-ignore-docstrings --with-xunit --xunit-file=unit_gevent_results.xml tests/unit/io/test_geventreactor.py || true
fi
echo "Running with event loop manager: $EVENT_LOOP_MANAGER"
echo "==========RUNNING SIMULACRON TESTS=========="
SIMULACRON_JAR="$HOME/simulacron.jar"
SIMULACRON_JAR=$SIMULACRON_JAR EVENT_LOOP_MANAGER=$EVENT_LOOP_MANAGER CASSANDRA_DIR=$CCM_INSTALL_DIR CCM_ARGS="$CCM_ARGS" DSE_VERSION=$CCM_CASSANDRA_VERSION MAPPED_CASSANDRA_VERSION=$MAPPED_CASSANDRA_VERSION VERIFY_CYTHON=$FORCE_CYTHON nosetests -s -v --logging-format="[%(levelname)s] %(asctime)s %(thread)d: %(message)s" --with-ignore-docstrings --with-xunit --xunit-file=simulacron_results.xml tests/integration/simulacron/ || true
echo "Running with event loop manager: $EVENT_LOOP_MANAGER"
echo "==========RUNNING CQLENGINE TESTS=========="
EVENT_LOOP_MANAGER=$EVENT_LOOP_MANAGER CCM_ARGS="$CCM_ARGS" CASSANDRA_VERSION=$CCM_CASSANDRA_VERSION MAPPED_CASSANDRA_VERSION=$MAPPED_CASSANDRA_VERSION VERIFY_CYTHON=$FORCE_CYTHON nosetests -s -v --logging-format="[%(levelname)s] %(asctime)s %(thread)d: %(message)s" --with-ignore-docstrings --with-xunit --xunit-file=cqle_results.xml tests/integration/cqlengine/ || true
echo "==========RUNNING INTEGRATION TESTS=========="
EVENT_LOOP_MANAGER=$EVENT_LOOP_MANAGER CCM_ARGS="$CCM_ARGS" CASSANDRA_VERSION=$CCM_CASSANDRA_VERSION MAPPED_CASSANDRA_VERSION=$MAPPED_CASSANDRA_VERSION VERIFY_CYTHON=$FORCE_CYTHON nosetests -s -v --logging-format="[%(levelname)s] %(asctime)s %(thread)d: %(message)s" --with-ignore-docstrings --with-xunit --xunit-file=standard_results.xml tests/integration/standard/ || true
if [ -z "$EXCLUDE_LONG" ]; then
echo "==========RUNNING LONG INTEGRATION TESTS=========="
EVENT_LOOP_MANAGER=$EVENT_LOOP_MANAGER CCM_ARGS="$CCM_ARGS" CASSANDRA_VERSION=$CCM_CASSANDRA_VERSION MAPPED_CASSANDRA_VERSION=$MAPPED_CASSANDRA_VERSION VERIFY_CYTHON=$FORCE_CYTHON nosetests -s -v --logging-format="[%(levelname)s] %(asctime)s %(thread)d: %(message)s" --exclude-dir=tests/integration/long/upgrade --with-ignore-docstrings --with-xunit --xunit-file=long_results.xml tests/integration/long/ || true
fi
- xunit:
- "*_results.xml"