forked from inveniosoftware/invenio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
92 lines (83 loc) · 3.82 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
# -*- coding: utf-8 -*-
##
## This file is part of Invenio.
## Copyright (C) 2013, 2014 CERN.
##
## Invenio is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
## published by the Free Software Foundation; either version 2 of the
## License, or (at your option) any later version.
##
## Invenio is distributed in the hope that it will be useful, but
## WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
## General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with Invenio; if not, write to the Free Software Foundation, Inc.,
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
notifications:
email: false
services:
- mysql
- redis
- mongodb
language: python
env:
- REQUIREMENTS=lowest
- REQUIREMENTS=release
- REQUIREMENTS=devel
python:
# FIXME: the build times out on Python 2.6 (inveniosoftware/invenio#1789)
# - "2.6"
- "2.7"
before_install:
- "sudo add-apt-repository -y ppa:chris-lea/node.js"
- "sudo apt-get update"
- "python requirements.py > .travis-lowest-requirements.txt"
- "touch .travis-release-requirements.txt"
install:
- "sudo apt-get -qy install apache2 libapache2-mod-wsgi ssl-cert poppler-utils git subversion nodejs --fix-missing"
- "sudo a2enmod actions"
- "sudo a2enmod version || echo ':('"
- "sudo a2enmod rewrite"
- "sudo mkdir /etc/apache2/ssl"
- "sudo /usr/sbin/make-ssl-cert generate-default-snakeoil /etc/apache2/ssl/apache.pem"
- "travis_retry pip install -r requirements.txt --quiet"
- "travis_retry pip install -r .travis-$REQUIREMENTS-requirements.txt --allow-all-external --quiet"
- "travis_retry pip install -e .[docs] --quiet --process-dependency-links"
- "python setup.py compile_catalog"
- "inveniomanage config create secret-key"
- "inveniomanage config set CFG_EMAIL_BACKEND flask.ext.email.backends.console.Mail"
- "inveniomanage config set CFG_BIBSCHED_PROCESS_USER `whoami`"
- "inveniomanage config set PACKAGES_EXCLUDE []" # test all packages
- "inveniomanage config set CFG_TMPDIR /tmp"
- "sudo su -c \"npm update\""
- "sudo su -c \"npm install --silent -g bower less clean-css uglify-js requirejs\""
# All the step below this points are solely for test purposes, don't use them
# to setup your invenio installation. Please do RTFM instead (INSTALL.rst).
- "inveniomanage bower -i bower-base.json > bower.json"
- "bower install --silent"
- "inveniomanage config set COLLECT_STORAGE flask.ext.collect.storage.link"
- "inveniomanage collect > /dev/null"
- "inveniomanage assets build"
- "inveniomanage config set CLEANCSS_BIN false" # deactivate all the things
- "inveniomanage config set LESS_BIN false" # false is /usr/bin/false
- "inveniomanage config set REQUIREJS_BIN false"
- "inveniomanage config set UGLIFYJS_BIN false"
- "inveniomanage config set ASSETS_AUTO_BUILD False"
before_script:
- "inveniomanage apache create-config"
- "sudo ln -s $VIRTUAL_ENV/var/invenio.base-instance/apache/invenio-apache-vhost.conf /etc/apache2/sites-enabled/invenio.conf"
- "sudo ln -s $VIRTUAL_ENV/var/invenio.base-instance/apache/invenio-apache-vhost-ssl.conf /etc/apache2/sites-enabled/invenio-ssl.conf"
- "sudo /usr/sbin/a2dissite *default* || echo ':('"
- "sudo /usr/sbin/a2enmod ssl" # enable SSL module
- "sudo /usr/sbin/a2enmod xsendfile || echo ':('"
- "sudo apachectl configtest && sudo service apache2 restart || echo 'Apache failed ...'"
- "inveniomanage database init --yes-i-know || echo ':('"
- "inveniomanage database create --quiet || echo ':('"
# - "inveniomanage demosite populate --yes-i-know"
script:
- "sphinx-build -qnNW docs docs/_build/html"
- "python setup.py test"
# - "wget -O /dev/null http://localhost"