-
Notifications
You must be signed in to change notification settings - Fork 5
/
.travis.yml
77 lines (66 loc) · 1.94 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
sudo: required
language: python
python:
- "2.7"
env:
global:
- COMPOSE_PROJECT_NAME=headless
matrix:
- ON_TRAVIS=True
TASK_ALWAYS_EAGER=True
HEADLESS_COMMAND=dev
- ON_TRAVIS=True
TASK_ALWAYS_EAGER=False
HEADLESS_COMMAND="coverage run --rcfile=/home/app/.coveragerc /usr/local/bin/celery -A headless.celery_app worker -l info -Q inasafe-headless -n inasafe-headless.%h -P solo"
WORKER_SCALE=1
INASAFE_LOG_LEVEL=10 # DEBUG log level
# Special environment for subsequent run stress testing
- ON_TRAVIS=True
TASK_ALWAYS_EAGER=True
HEADLESS_COMMAND=dev
SUBSEQUENT_RUN_TESTING=True
virtualenv:
system_site_packages: true
services:
- docker
branches:
only:
- develop
before_install:
- sudo apt-get -y update
- sudo apt-get -y install libssl-dev
- sudo pip install -r REQUIREMENTS-TRAVIS.txt
install:
# build current docker image
- pushd deployment
- cp ansible/development/group_vars/all.travis.yml ansible/development/group_vars/all.yml
- make setup-ansible ANSIBLE_ARGS="--extra-vars='ansible_sudo_pass=\"\"' --extra-vars='pycharm_version=\"\"' --skip-tags=development"
- make build
- make up
- make status
- cat docker-compose.override.yml
- cp -f ../src/headless/celeryconfig_sample.py ../src/headless/celeryconfig.py
- popd
script:
- pushd deployment
- make check-flake8
- ../src/scripts/start_coverage_unittest_worker.sh
- ../src/scripts/run_coverage_tests.sh ${PWD} ../src
- ../src/scripts/stop_coverage_unittest_worker.sh || true
- popd
after_script:
# Clean up
- pushd deployment
- make down
- popd
after_success:
- pushd src
- ls .coverage*
- coverage combine
- cat .coverage
# Fix path (codecov.yml doesn't work)
# Replace parent directory to travis directory, because we are running
# coverage using docker mount
- sed -i 's/home\/app/home\/travis\/build\/inasafe\/inasafe-headless\/src/g' .coverage
- codecov
- popd