mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 06:23:38 +00:00
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:
15
.travis.yml
Normal file
15
.travis.yml
Normal file
@@ -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"
|
VENV_PATH="/srv/zulip-venv"
|
||||||
ZULIP_PATH="/srv/zulip"
|
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.
|
# tsearch-extras is an extension to postgres's built-in full-text search.
|
||||||
# TODO: use a real APT repository
|
# TODO: use a real APT repository
|
||||||
TSEARCH_URL_BASE = "https://dl.dropboxusercontent.com/u/283158365/zuliposs/"
|
TSEARCH_URL_BASE = "https://dl.dropboxusercontent.com/u/283158365/zuliposs/"
|
||||||
@@ -159,6 +163,10 @@ def main():
|
|||||||
os.system("tools/download-zxcvbn")
|
os.system("tools/download-zxcvbn")
|
||||||
os.system("tools/emoji_dump/build_emoji")
|
os.system("tools/emoji_dump/build_emoji")
|
||||||
os.system("generate_secrets.py -d")
|
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.configure_rabbitmq(**LOUD)
|
||||||
sh.postgres_init_db(**LOUD)
|
sh.postgres_init_db(**LOUD)
|
||||||
sh.do_destroy_rebuild_database(**LOUD)
|
sh.do_destroy_rebuild_database(**LOUD)
|
||||||
|
|||||||
Reference in New Issue
Block a user