forked from oppia/foundation-website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
49 lines (40 loc) · 1.12 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
dist: trusty
language: python
python:
- 2.7
branches:
only:
- master
env:
matrix:
- RUN_BACKEND_TESTS=true REPORT_BACKEND_COVERAGE=true
- RUN_LINT=true
matrix:
allow_failures: []
fast_finish: true
before_install:
- source /opt/jdk_switcher/jdk_switcher.sh
- jdk_switcher use oraclejdk8
- pip install codecov
- export CHROME_BIN=/usr/bin/google-chrome-stable
- export DISPLAY=:99.0
- bash -e /etc/init.d/xvfb start
install:
- pushd $TRAVIS_BUILD_DIR
- source scripts/setup.sh || exit 1
- source scripts/setup_gae.sh || exit 1
script:
- if [ "$RUN_LINT" == 'true' ]; then bash scripts/run_linter.sh; fi
- if [ "$RUN_BACKEND_TESTS" == 'true' ] && [ "$REPORT_BACKEND_COVERAGE" == 'true' ]; then bash scripts/run_backend_tests.sh --generate_coverage_report; fi
after_success:
- if [ "$RUN_BACKEND_TESTS" == 'true' ] && [ "$REPORT_BACKEND_COVERAGE" == 'true' ]; then codecov; fi
cache:
# Cache dependencies.
directories:
- oppia_tools/
- node_modules/
- third_party/
- $HOME/.cache/pip
before_cache:
- find third_party -name "*.pyc" -print -delete
- find oppia_tools -name "*.pyc" -print -delete