diff --git a/.travis.yml b/.travis.yml index 9c4997fa7..6403cc585 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,13 +4,28 @@ python: - "3.4" - "3.5" - "3.6" -env: TEST_SUITE=test-main +env: + matrix: + - TEST_SUITE=test-main + global: + - BOTO_CONFIG=/tmp/nowhere matrix: include: - python: "2.7" env: TEST_SUITE=test-py2-legacy-support - python: "3.6" env: TEST_SUITE=test-static-analysis + - python: "3.6" + sudo: required + env: TEST_SUITE=backend + script: + - echo $TRAVIS_PULL_REQUEST_BRANCH + - echo $TRAVIS_PULL_REQUEST_SLUG + - echo $TRAVIS_PULL_REQUEST + - cd + - git clone https://github.com/zulip/zulip.git + - cd zulip + - $TRAVIS_BUILD_DIR/tools/test-backend addons: postgresql: "9.3" install: diff --git a/tools/test-backend b/tools/test-backend new file mode 100755 index 000000000..4ee7999ef --- /dev/null +++ b/tools/test-backend @@ -0,0 +1,15 @@ +#!/bin/bash + +sed -i "s|zulip/python-zulip-api.git@0.3.4|$TRAVIS_PULL_REQUEST_SLUG/tree/$TRAVIS_PULL_REQUEST_BRANCH|" requirements/common.txt +sed -i "s|zulip/python-zulip-api.git@0.3.4|$TRAVIS_PULL_REQUEST_SLUG/tree/$TRAVIS_PULL_REQUEST_BRANCH|" requirements/dev_lock.txt +sed -i "s|zulip/python-zulip-api.git@0.3.4|$TRAVIS_PULL_REQUEST_SLUG/tree/$TRAVIS_PULL_REQUEST_BRANCH|" requirements/prod_lock.txt + +./tools/travis/setup-backend + +source tools/travis/activate-venv +echo "Test suite is running under $(python --version)." + +set -e +set -x + +./tools/test-api