2017-06-06 03:15:17 +02:00
|
|
|
# See https://zulip.readthedocs.io/en/latest/events-system.html for
|
|
|
|
# high-level documentation on our Travis CI setup.
|
2016-07-02 03:06:57 +02:00
|
|
|
dist: trusty
|
2017-06-15 01:36:50 +02:00
|
|
|
before_install:
|
|
|
|
- sudo apt-get install moreutils # To use 'ts' and 'mispipe' for timing logs.
|
2015-09-28 18:17:23 +02:00
|
|
|
install:
|
2016-09-21 08:44:01 +02:00
|
|
|
# Disable Travis CI's built-in NVM installation
|
2017-06-15 01:36:50 +02:00
|
|
|
- mispipe "mv ~/.nvm ~/.travis-nvm-disabled" ts
|
2017-06-06 03:15:17 +02:00
|
|
|
|
2017-06-20 05:32:16 +02:00
|
|
|
# Install codecov, the library for the code coverage reporting tool we use
|
2017-06-19 05:51:16 +02:00
|
|
|
- mispipe "pip install codecov" ts
|
2017-06-06 03:15:17 +02:00
|
|
|
|
|
|
|
# This is the main setup job for the test suite
|
2017-06-15 01:36:50 +02:00
|
|
|
- mispipe "tools/travis/setup-$TEST_SUITE" ts
|
2017-06-06 03:15:17 +02:00
|
|
|
|
|
|
|
# Clean any virtualenvs that are not in use to avoid our cache
|
2017-06-18 10:33:48 +02:00
|
|
|
# becoming huge.
|
2017-06-15 01:36:50 +02:00
|
|
|
- mispipe "tools/clean-venv-cache --travis" ts
|
2017-06-18 03:00:44 +02:00
|
|
|
|
|
|
|
# Clean any npm cache which was generated but not required anymore to avoid
|
|
|
|
# our cache becoming huge.
|
|
|
|
- mispipe "tools/clean-npm-cache --travis" ts
|
2017-06-18 10:33:48 +02:00
|
|
|
|
|
|
|
# Clean any emoji cache which was generated but not required anymore to avoid
|
|
|
|
# our cache becoming huge.
|
|
|
|
- mispipe "tools/clean-emoji-cache --travis" ts
|
2017-06-06 03:15:17 +02:00
|
|
|
script:
|
|
|
|
# We unset GEM_PATH here as a hack to work around Travis CI having
|
|
|
|
# broken running their system puppet with Ruby. See
|
|
|
|
# https://travis-ci.org/zulip/zulip/jobs/240120991 for an example traceback.
|
|
|
|
- unset GEM_PATH
|
2017-06-15 01:36:50 +02:00
|
|
|
- mispipe "./tools/travis/$TEST_SUITE" ts
|
2015-10-14 15:59:35 +02:00
|
|
|
cache:
|
|
|
|
- apt: false
|
2015-12-26 18:16:29 +01:00
|
|
|
- directories:
|
2016-05-03 22:54:29 +02:00
|
|
|
- $HOME/zulip-venv-cache
|
2017-06-03 20:50:43 +02:00
|
|
|
- $HOME/zulip-npm-cache
|
2017-06-03 20:50:43 +02:00
|
|
|
- $HOME/zulip-emoji-cache
|
2016-06-14 10:33:23 +02:00
|
|
|
- $HOME/node
|
2015-10-15 01:47:42 +02:00
|
|
|
env:
|
2016-06-04 21:03:14 +02:00
|
|
|
global:
|
2016-07-03 11:07:12 +02:00
|
|
|
- BOTO_CONFIG=/tmp/nowhere
|
2015-09-28 18:17:23 +02:00
|
|
|
language: python
|
2017-06-06 03:15:17 +02:00
|
|
|
# We run all of our test suites for both Python 2.7 and 3.4, with the
|
|
|
|
# exception of static analysis, which is just run once (and checks
|
|
|
|
# against both Python versions).
|
2016-04-18 11:46:53 +02:00
|
|
|
matrix:
|
|
|
|
include:
|
|
|
|
- python: "3.4"
|
2016-07-11 06:53:08 +02:00
|
|
|
env: TEST_SUITE=static-analysis
|
2016-10-10 19:58:01 +02:00
|
|
|
- python: "3.4"
|
|
|
|
env: TEST_SUITE=production
|
2016-07-18 23:29:56 +02:00
|
|
|
- python: "2.7"
|
|
|
|
env: TEST_SUITE=production
|
2017-02-12 20:06:31 +01:00
|
|
|
- python: "2.7"
|
|
|
|
env: TEST_SUITE=frontend
|
|
|
|
- python: "3.4"
|
|
|
|
env: TEST_SUITE=frontend
|
|
|
|
- python: "2.7"
|
|
|
|
env: TEST_SUITE=backend
|
|
|
|
- python: "3.4"
|
|
|
|
env: TEST_SUITE=backend
|
2015-09-28 18:17:23 +02:00
|
|
|
sudo: required
|
|
|
|
services:
|
|
|
|
- docker
|
|
|
|
addons:
|
2016-09-22 10:29:31 +02:00
|
|
|
artifacts:
|
|
|
|
paths:
|
2017-06-06 03:15:17 +02:00
|
|
|
# Casper debugging data (screenshots, etc.) is super useful for
|
|
|
|
# debugging test flakes.
|
2016-09-22 10:29:31 +02:00
|
|
|
- $(ls var/casper/* | tr "\n" ":")
|
2016-09-30 12:35:49 +02:00
|
|
|
- $(ls /tmp/zulip-test-event-log/* | tr "\n" ":")
|
2015-09-28 18:17:23 +02:00
|
|
|
postgresql: "9.3"
|
2016-06-04 21:03:14 +02:00
|
|
|
after_success:
|
2017-06-19 05:51:16 +02:00
|
|
|
- codecov
|
2016-06-04 21:03:14 +02:00
|
|
|
notifications:
|
2017-03-11 20:36:24 +01:00
|
|
|
webhooks:
|
|
|
|
urls:
|
|
|
|
- https://zulip.org/zulipbot/travis
|
|
|
|
on_success: always
|
|
|
|
on_failure: always
|