-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
100 lines (90 loc) · 3.09 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
language: python
python: 3.5
sudo: required
dist: trusty
env:
global:
- CXX=g++-4.8
# do not load /etc/boto.cfg with Python 3 incompatible plugin
# https://github.com/travis-ci/travis-ci/issues/5246#issuecomment-166460882
- BOTO_CONFIG=/doesnotexist
- SYNDICATION_VALIDATE_AUTH=0
- MAIL_SERVER='localhost'
- MAIL_PORT=2225
- MAIL_USERNAME=
- MAIL_PASSWORD=
- MAIL_USE_TLS=0
- MAIL_USE_SSL=0
- MAIL_DEBUG=1
- MAIL_SUPPRESS_SEND=True
services:
- mongodb
- redis-server
addons:
apt:
sources:
- mongodb-3.0-precise
- elasticsearch-1.7
- ubuntu-toolchain-r-test
packages:
- mongodb-org-server
- elasticsearch
- xvfb
- build-essential
- libudev-dev
- clang-3.3
- fakeroot
- git
- libgnome-keyring-dev
- g++-4.8
- google-chrome-stable
cache:
directories:
- $HOME/.cache/pip
- $HOME/.npm
before_install:
- nvm install 6.7.0
- nvm use 6.7.0
- sudo apt-get -qq update --allow-unauthenticated
- sudo apt-get purge -f elasticsearch
- sudo apt-get install -t stable elasticsearch
- node --version
- npm config set loglevel warn
- npm install -g grunt-cli
- pip install requests
- export DISPLAY=:99.0
- /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1920x1080x24
- export CHROME_BIN=`which google-chrome`
- $CHROME_BIN --version
install:
- cd $TRAVIS_BUILD_DIR/server
- pip install --upgrade setuptools
- pip install -r dev-requirements.txt
- cd $TRAVIS_BUILD_DIR/client && npm install && cd .. ;
before_script:
- ./scripts/elastic.sh
- sudo service elasticsearch restart && sleep 10
- cd $TRAVIS_BUILD_DIR/server
- (nohup env LOG_CONFIG_FILE=../logging_travis_config.yml SUPERDESK_URL='http://localhost:5000/api' SUPERDESK_CLIENT_URL='http://localhost:9000' WEB_CONCURRENCY=3 WEB_TIMEOUT=8 SUPERDESK_TESTING='True' honcho start &)
- cd $TRAVIS_BUILD_DIR/client
- MARKETPLACE=true SYNDICATION=true grunt build --server='http://localhost:5000/api' --ws='ws://localhost:5100'
- cd dist
- while [ ! -f index.html ]; do sleep .5; done
- (nohup sudo python3 -m smtpd -n -c DebuggingServer localhost:2225 &)
- (nohup python3 -m http.server 9000 &)
script:
- cd $TRAVIS_BUILD_DIR/server && nosetests --all-modules ;
- cd $TRAVIS_BUILD_DIR/server && behave --format progress2 --logging-level ERROR ;
- cd $TRAVIS_BUILD_DIR/server && flake8 ;
- cd $TRAVIS_BUILD_DIR/client && npm test ;
- cd $TRAVIS_BUILD_DIR/server
- python3 app_init_elastic.py ;
- python3 manage.py app:initialize_data ;
- python3 manage.py users:create -u admin -p admin -e '[email protected]' --admin ;
- python3 manage.py register_local_themes ;
- python3 manage.py register_bloglist ;
- cd $TRAVIS_BUILD_DIR/client
- ./node_modules/.bin/webdriver-manager update
- ./node_modules/.bin/protractor protractor-conf.js
after_script:
- killall -9 python