mirror of https://github.com/zulip/zulip.git
Run Zulip tests automatically using Travis CI.
This is a bit hackish in that ideally we'd use proper options parsing in provision.py, but it works and I even ran the tests 100x for tests for flakes and didn't get any, so it's definitely an improvement! With this we'll be both testing the runtime and effectively the Dev VM setup process, which is awesome; the additional thing I'd want to add tests for is the production setup process...
This commit is contained in:
parent
ed742fa847
commit
d2f5937d89
|
@ -0,0 +1,15 @@
|
|||
install:
|
||||
- pip install pbs
|
||||
- python provision.py --travis
|
||||
cache: apt
|
||||
language: python
|
||||
python:
|
||||
- "2.7"
|
||||
# command to run tests
|
||||
script:
|
||||
- source /srv/zulip-venv/bin/activate && env PATH=$PATH:/srv/zulip-venv/bin ./tools/test-all
|
||||
sudo: required
|
||||
services:
|
||||
- docker
|
||||
addons:
|
||||
postgresql: "9.3"
|
|
@ -51,6 +51,10 @@ NPM_DEPENDENCIES = {
|
|||
VENV_PATH="/srv/zulip-venv"
|
||||
ZULIP_PATH="/srv/zulip"
|
||||
|
||||
# TODO: Parse arguments properly
|
||||
if sys.argv[1] == "--travis":
|
||||
ZULIP_PATH="."
|
||||
|
||||
# tsearch-extras is an extension to postgres's built-in full-text search.
|
||||
# TODO: use a real APT repository
|
||||
TSEARCH_URL_BASE = "https://dl.dropboxusercontent.com/u/283158365/zuliposs/"
|
||||
|
@ -159,6 +163,10 @@ def main():
|
|||
os.system("tools/download-zxcvbn")
|
||||
os.system("tools/emoji_dump/build_emoji")
|
||||
os.system("generate_secrets.py -d")
|
||||
if sys.argv[1] == "--travis":
|
||||
os.system("sudo service rabbitmq-server restart")
|
||||
os.system("sudo service redis-server restart")
|
||||
os.system("sudo service memcached restart")
|
||||
sh.configure_rabbitmq(**LOUD)
|
||||
sh.postgres_init_db(**LOUD)
|
||||
sh.do_destroy_rebuild_database(**LOUD)
|
||||
|
|
Loading…
Reference in New Issue