schedules: commit_master: schedule: per_commit branches: include: [master] env_vars: | EVENT_LOOP_MANAGER='libev' matrix: exclude: - python: [3.4, 3.6] commit_branches: schedule: per_commit branches: include: [/python.*/] env_vars: | EVENT_LOOP_MANAGER='libev' matrix: exclude: - python: [3.4, 3.6] - cassandra: ['2.0', '2.1', '3.0'] 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] weekly_eventlet: schedule: 0 18 * * 6 branches: include: [master] env_vars: | EVENT_LOOP_MANAGER='eventlet' weekly_async: schedule: 0 10 * * 7 branches: include: [master] env_vars: | EVENT_LOOP_MANAGER='async' weekly_twister: schedule: 0 14 * * 7 branches: include: [master] env_vars: | EVENT_LOOP_MANAGER='twisted' python: - 2.7 - 3.4 - 3.5 - 3.6 os: - ubuntu/trusty64 cassandra: - '2.0' - '2.1' - '2.2' - '3.0' - '3.11' env: CYTHON: - CYTHON - NO_CYTHON build: - script: | export JAVA_HOME=$CCM_JAVA_HOME export PATH=$JAVA_HOME/bin:$PATH export PYTHONPATH="" pip install git+https://github.com/pcmanus/ccm.git # Install dependencies sudo apt-get install -y libev4 libev-dev pip install -r test-requirements.txt pip install nose-ignore-docstring 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 "Installing simulacron" pushd ~ git clone git@github.com:datastax/simulacron.git cd simulacron git clone git@github.com:datastax/native-protocol.git cd native-protocol mvn clean install cd .. mvn clean install -DskipTests=true ls standalone/target SIMULACRON_JAR=`find \`pwd\` -name "simulacron-standalone-*.jar"` echo "SIMULACRON_JAR: $SIMULACRON_JAR" popd # 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 MONKEY_PATCH_LOOP=1 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_eventlet_results.xml tests/unit/io/test_eventletreactor.py || true MONKEY_PATCH_LOOP=1 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_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=$SIMULACRON_JAR EVENT_LOOP_MANAGER=$EVENT_LOOP_MANAGER CASSANDRA_DIR=$CCM_INSTALL_DIR DSE_VERSION=$CCM_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 CASSANDRA_VERSION=$CCM_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 CASSANDRA_VERSION=$CCM_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 echo "==========RUNNING LONG INTEGRATION TESTS==========" EVENT_LOOP_MANAGER=$EVENT_LOOP_MANAGER CASSANDRA_VERSION=$CCM_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=long_results.xml tests/integration/long/ || true - xunit: - "*_results.xml"