travis: Skip development database setup in production tests.

This saves about 20s on the runtime of the production build.
This commit is contained in:
Tim Abbott
2016-06-22 08:45:17 -07:00
parent 0f2729f5fb
commit 5a109cf816
2 changed files with 9 additions and 7 deletions

View File

@@ -191,6 +191,8 @@ def main():
run(["sudo", "pg_createcluster", "-e", "utf8", "--start", POSTGRES_VERSION, "main"])
run(["sudo", "service", "redis-server", "restart"])
run(["sudo", "service", "memcached", "restart"])
if '--production-travis' not in sys.argv:
# These won't be used anyway
run(["scripts/setup/configure-rabbitmq"])
run(["tools/setup/postgres-init-dev-db"])
run(["tools/do-destroy-rebuild-database"])

View File

@@ -7,7 +7,7 @@ set -x
# to conflicts over which version of postgres should be running.
sudo apt-get remove postgresql-9.1 postgresql-9.2 postgresql-9.4 -y
python provision.py --travis
python provision.py --travis --production-travis
cp -a tools/travis/success-http-headers.txt ~/
source /srv/zulip-venv/bin/activate
./tools/build-release-tarball travis