forked from amcat/amcat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
71 lines (62 loc) · 2.65 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
sudo: required
dist: trusty
language: python
python:
- "3.4"
jvm:
- "oraclejdk8"
addons:
apt:
sources:
- r-packages-trusty
services:
- postgresql
- memcached
- rabbitmq
virtualenv:
system_site_packages: true
before_install:
- psql -c 'create database amcat;' -U postgres
- export DJANGO_DB_USER=postgres
- export DJANGO_LOG_LEVEL=WARNING
- export DJANGO_SETTINGS_MODULE=settings
- export TRAVIS=true
- export AMCAT_ES_LEGACY_HASH=0
- export PYTHONPATH=
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- sleep 2 # Give framebuffer some time to start
install:
- sudo apt-get update
- cat apt_requirements.txt | tr '\n' ' ' | xargs sudo apt-get install -y
- sudo apt-get install python-lxml python-amqplib python-psycopg2 python-requests python-pygments texinfo -y
- sudo service rabbitmq-server start
# Latest PSPP (present in 15.04, 15.10, 16.04 archives)
- sudo apt-get install debhelper dh-apparmor gir1.2-atk-1.0 gir1.2-gtk-2.0 gir1.2-pango-1.0 gperf libatk1.0-dev libgsl0-dev libgtk2.0-dev libgtksourceview2.0-dev libharfbuzz-dev libharfbuzz-gobject0 libintl-perl libkpathsea6 libpango1.0-dev libptexenc1 librsvg2-bin libtext-diff-perl libtext-unidecode-perl libxcomposite-dev libxcursor-dev libxi-dev libxinerama-dev libxml-libxml-perl libxml-namespacesupport-perl libxml-sax-base-perl libxml-sax-perl libxml2-utils libxrandr-dev x11proto-composite-dev x11proto-randr-dev x11proto-xinerama-dev -y
- wget "http://ftp.download-by.net/gnu/gnu/pspp/pspp-0.8.5.tar.gz" -O - | tar xvz
- cd pspp*
- ./configure
- make -j4 >make_stdout.log 2>make_stderr.log
- sudo make install
- cd ..
# Elasticsearch
- wget --no-check-certificate https://download.elasticsearch.org/elasticsearch/release/org/elasticsearch/distribution/deb/elasticsearch/2.1.1/elasticsearch-2.1.1.deb
- sudo dpkg -i elasticsearch-2.1.1.deb
- sudo /usr/share/elasticsearch/bin/plugin install mobz/elasticsearch-head
- sudo /usr/share/elasticsearch/bin/plugin install analysis-icu
- sudo /usr/share/elasticsearch/bin/plugin install amcat/hitcount
- "sudo tee -a /etc/elasticsearch/elasticsearch.yml <<< 'index.similarity.default.type: hitcountsimilarity'"
- "sudo tee -a /etc/elasticsearch/elasticsearch.yml <<< 'script.inline: on'"
- "sudo tee -a /etc/elasticsearch/elasticsearch.yml <<< 'script.update: on'"
- sudo service elasticsearch stop
- sudo service elasticsearch start
- pip install -r requirements.txt
- pip install coverage coveralls
- celery -A amcat.amcatcelery worker -l DEBUG -Q amcat &
- npm install -g bower
- bower install
script:
- coverage run --source=. --omit=*/migrations/*,settings/* -m amcat.manage test
after_success:
- coverage report -m
- coveralls