forked from novius-os/novius-os
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
45 lines (45 loc) · 1.63 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
language: php
php:
- 5.5
- 5.4
- 5.3
services:
- mysql
notifications:
email:
recipients:
on_success: change
on_failure: always
before_install:
- git submodule update --init --recursive
- git clone git://github.com/novius-os/ci.git
- cd ci
- echo $TRAVIS_BRANCH
- git checkout $TRAVIS_BRANCH; echo "In case branch does not exist for ci repository, echo return OK"
- cd ..
before_script:
- echo 'short_open_tag="1"' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- sudo apt-get install apache2 libapache2-mod-fastcgi
# enable php-fpm
- sudo cp ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf.default ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf
- sudo a2enmod rewrite actions fastcgi alias
- echo "cgi.fix_pathinfo = 1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- ~/.phpenv/versions/$(phpenv version-name)/sbin/php-fpm
# configure apache virtual hosts
- sudo cp -f ci/data/virtualhost-dev /etc/apache2/sites-available/default
- sudo sed -e "s?%TRAVIS_BUILD_DIR%?$(pwd)/public?g" --in-place /etc/apache2/sites-available/default
- sudo service apache2 restart
- sudo sh -c 'echo "127.0.0.1 novius-os" >> /etc/hosts'
- sudo chmod +x ci/scripts/travis.sh
script:
- cd ci/scripts
- ./travis.sh
- sudo cp ../data/contexts.config.php ../../local/config/
- ./travis.sh
- cd ../../
- sudo cp -f ci/data/virtualhost-prod /etc/apache2/sites-available/default
- sudo sed -e "s?%TRAVIS_BUILD_DIR%?$(pwd)/public?g" --in-place /etc/apache2/sites-available/default
- sudo service apache2 reload
- cd ci/scripts
- ./travis.sh