-
Notifications
You must be signed in to change notification settings - Fork 18
/
.travis.yml
57 lines (52 loc) · 2.01 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
# Forces new Travis-CI Infrastructure
sudo: false
language: php
php:
- 5.5
- 5.6
- 7.0
matrix:
allow_failures:
- php: 7.0
before_script:
# Make sure all dev dependencies are installed
- sudo apt-get update -qq
# Install Apache
- sudo apt-get install -y --force-yes apache2 libapache2-mod-php5 php5-curl php5-mysql php5-intl php5-gd > /dev/null
- sudo /etc/init.d/apache2 stop
- sudo sed -i -e "s,APACHE_RUN_USER=www-data,APACHE_RUN_USER=$USER,g" /etc/apache2/envvars
- sudo sed -i -e "s,APACHE_RUN_GROUP=www-data,APACHE_RUN_GROUP=$USER,g" /etc/apache2/envvars
- sudo chown -R $USER /var/lock/apache2
- sudo chown -R $USER:$USER /var/www
- ln -s $TRAVIS_BUILD_DIR/tests/ /var/www/tests
- sudo sed -i -e "s,AllowOverride[ ]None,AllowOverride All,g" /etc/apache2/sites-available/default
- sudo /etc/init.d/apache2 start
# Xvfb
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- sleep 3 # give xvfb some time to start
# Fluxbox
- sudo apt-get install fluxbox -y --force-yes
- fluxbox &
- sleep 3 # give fluxbox some time to start
# zip
- sudo apt-get install zip
- sleep 3 # give fluxbox some time to start
# Enable additional PHP extensions
- sh -c "if [ '$TRAVIS_PHP_VERSION' != '7.0' ]; then phpenv config-add build/travis/phpenv/memcached.ini; fi"
- sh -c "if [ '$TRAVIS_PHP_VERSION' == '5.3' ] || [ '$TRAVIS_PHP_VERSION' == '5.4' ]; then phpenv config-add build/travis/phpenv/apc-$TRAVIS_PHP_VERSION.ini; fi"
- sh -c "if [ '$TRAVIS_PHP_VERSION' != '7.0' ]; then phpenv config-add build/travis/phpenv/redis.ini; fi"
# PHP 5.5+ needs APCu
- if [ '$TRAVIS_PHP_VERSION' == "5.5" ] || [ '$TRAVIS_PHP_VERSION' == "5.6" ]; then printf "\n" | echo -e "extension = apcu.so\napc.enabled=1\napc.enable_cli=1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi
# Run Build command
- cd build/
- php phing.phar
- cd release
- mv pkg_digicom_* latest.zip
- unzip latest.zip -d src
- cd ../../
# we are ready to run composer
- composer update
script:
- mv tests/acceptance.suite.dist.yml tests/acceptance.suite.yml
- vendor/bin/robo run:tests