forked from oppia/oppia
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
105 lines (94 loc) · 3.42 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
sudo: required
# In order to install Chrome stable we need trusty distribution.
dist: trusty
language: python
python:
- 2.7
addons:
firefox: latest
apt:
sources:
- google-chrome
packages:
- google-chrome-stable
- google-chrome-beta
branches:
only:
- master
- develop
env:
matrix:
- RUN_E2E_TESTS_MAIN_EDITOR=true
- RUN_E2E_TESTS_EDITOR_FEATURES=true
- RUN_E2E_TESTS_EXTENSIONS=true
- RUN_E2E_TESTS_LIBRARY=true
- RUN_E2E_TESTS_MISC=true
- RUN_E2E_TESTS_I18N=true
- RUN_BACKEND_TESTS=true REPORT_BACKEND_COVERAGE=false
- RUN_BACKEND_TESTS=true REPORT_BACKEND_COVERAGE=true
- RUN_LINT=true
- RUN_FRONTEND_TESTS=true
- RUN_PERFORMANCE_TESTS=true
matrix:
allow_failures:
# The backend tests, with coverage, take too long to run, so we make this
# optional.
- env: RUN_BACKEND_TESTS=true REPORT_BACKEND_COVERAGE=true
fast_finish: true
notifications:
email:
recipients:
on_success: change
on_failure: change
irc:
channels:
- chat.freenode.net#oppia
on_success: never
on_failure: always
webhooks:
urls:
# This URL can be obtained by going to the Gitter chat room
# and clicking Settings > Integrations.
- https://webhooks.gitter.im/e/f8f782497ec1ffcea2e7
on_success: always
on_failure: always
before_install:
- pip install codecov
- pip install numpy==1.6.1
- export CHROME_BIN=/usr/bin/google-chrome-stable
- export DISPLAY=:99.0
- bash -e /etc/init.d/xvfb start
install:
- set -e
- pushd $TRAVIS_BUILD_DIR
- source scripts/setup.sh || exit 1
- source scripts/setup_gae.sh || exit 1
script:
- if [ $RUN_E2E_TESTS_MAIN_EDITOR == 'true' ]; then bash scripts/run_e2e_tests.sh --suite="mainEditor"; fi
- if [ $RUN_E2E_TESTS_EDITOR_FEATURES == 'true' ]; then bash scripts/run_e2e_tests.sh --suite="editorFeatures"; fi
- if [ $RUN_E2E_TESTS_EXTENSIONS == 'true' ]; then bash scripts/run_e2e_tests.sh --suite="extensions"; fi
- if [ $RUN_E2E_TESTS_LIBRARY == 'true' ]; then bash scripts/run_e2e_tests.sh --suite="library"; fi
- if [ $RUN_E2E_TESTS_MISC == 'true' ]; then bash scripts/run_e2e_tests.sh --suite="misc"; fi
- if [ $RUN_E2E_TESTS_I18N == 'true' ]; then bash scripts/run_e2e_tests.sh --suite="i18n"; fi
- if [ $RUN_BACKEND_TESTS == 'true' ] && [ $REPORT_BACKEND_COVERAGE == 'true' ]; then bash scripts/run_backend_tests.sh --generate_coverage_report; fi
- if [ $RUN_BACKEND_TESTS == 'true' ] && [ $REPORT_BACKEND_COVERAGE == 'false' ]; then bash scripts/run_backend_tests.sh; fi
- if [ $RUN_LINT == 'true' ]; then bash scripts/install_third_party.sh; python scripts/pre_commit_linter.py --path=.; fi
# Travis aborts test run if nothing is printed back to STDOUT for some time.
# -x is used to avoid that.
- if [ $RUN_FRONTEND_TESTS == 'true' ]; then bash -x scripts/run_frontend_tests.sh --run-minified-tests=true; fi
- if [ $RUN_PERFORMANCE_TESTS == 'true' ]; then bash scripts/run_performance_tests.sh; fi
after_success:
- if [ $RUN_BACKEND_TESTS == 'true' ] && [ $REPORT_BACKEND_COVERAGE == 'true' ]; then codecov; fi
- if [ $RUN_FRONTEND_TESTS == 'true' ]; then codecov --file ../karma_coverage_reports/coverage-final.json; fi
cache:
# Cache Oppia's dependencies.
directories:
- ../node_modules/
- ../oppia_tools/
- third_party/
before_cache:
# Delete python bytecode to prevent cache rebuild.
- find third_party -name "*.pyc" -print -delete