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,12 +191,14 @@ def main():
run(["sudo", "pg_createcluster", "-e", "utf8", "--start", POSTGRES_VERSION, "main"])
run(["sudo", "service", "redis-server", "restart"])
run(["sudo", "service", "memcached", "restart"])
run(["scripts/setup/configure-rabbitmq"])
run(["tools/setup/postgres-init-dev-db"])
run(["tools/do-destroy-rebuild-database"])
run(["tools/setup/postgres-init-test-db"])
run(["tools/do-destroy-rebuild-test-database"])
run(["python", "./manage.py", "compilemessages"])
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"])
run(["tools/setup/postgres-init-test-db"])
run(["tools/do-destroy-rebuild-test-database"])
run(["python", "./manage.py", "compilemessages"])
# Install the pinned version of npm.
install_npm()
# Run npm install last because it can be flaky, and that way one