forked from OXID-eSales/oxideshop_ce
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
51 lines (39 loc) · 2.17 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
language: php
notifications:
email: false
php:
- "5.5"
- "5.6"
- "7.0"
matrix:
fast_finish: true
# TRAVIS_ERROR_LEVEL = E_ALL & ~E_DEPRECATED & ~E_NOTICE & ~E_STRICT
env: TRAVIS_ERROR_LEVEL=22519 OX_BASE_PATH="$TRAVIS_BUILD_DIR/source/"
services: mysql
before_install:
- echo 'Europe/Berlin' | sudo tee /etc/timezone
- sudo dpkg-reconfigure --frontend noninteractive tzdata
- sudo apt-get update
before_script:
# apache setup (http://docs.travis-ci.com/user/languages/php/#Apache-%2B-PHP)
- sudo apt-get install apache2 libapache2-mod-fastcgi
# enable php-fpm
- cp ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf.default ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf
- if [[ $(phpenv version-name) = 7.* ]]; then cp ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.d/www.conf.default ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.d/www.conf; fi;
- 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
- phpenv config-rm xdebug.ini
# configure apache virtual host
- echo "$(curl -fsSL https://gist.githubusercontent.com/adriankirchner/197e3d13ccfb680f8942/raw/5b36cd3740cc05adb1c9d5c0568c851dd7700dcc/gistfile1.apacheconf)" | sudo tee /etc/apache2/sites-available/default > /dev/null
- sudo sed -e "s|%TRAVIS_BUILD_DIR%|$(pwd)/source|g" --in-place /etc/apache2/sites-available/default
- sudo service apache2 restart
# database setup
- sudo sed -e 's|utf8_unicode_ci|latin1_general_ci|g; s|utf8|latin1|g' --in-place /etc/mysql/my.cnf
- sudo service mysql restart
# replace configuration values in config.inc.php
- mv source/config.inc.php.dist source/config.inc.php
- sed -i 's|<dbHost>|localhost|; s|<dbName>|oxidehop|; s|<dbUser>|root|; s|<dbPwd>||; s|<sShopURL>|http://localhost|; s|<sShopDir>|'$TRAVIS_BUILD_DIR'/source|; s|<sCompileDir>|'$TRAVIS_BUILD_DIR'/source/tmp|; s|<iUtfMode>|1|; s|$this->iDebug = 0|$this->iDebug = 1|' source/config.inc.php
# composer initiation
- SHOP_PATH='source' SHOP_TESTS_PATH='tests' MODULES_PATH='' composer install
script: vendor/bin/runtests