2013-02-01 15:32:12 +01:00
|
|
|
language: php
|
2019-09-27 18:14:06 +02:00
|
|
|
php: '5.6'
|
2017-09-14 12:29:03 +02:00
|
|
|
|
|
|
|
cache:
|
|
|
|
directories:
|
2017-09-15 11:33:27 +02:00
|
|
|
- $HOME/.composer/cache
|
2017-09-14 12:29:03 +02:00
|
|
|
|
2014-05-02 18:57:39 +02:00
|
|
|
before_install:
|
2013-02-01 15:32:12 +01:00
|
|
|
- sudo apt-get update -qq
|
|
|
|
- sudo apt-get install -y -qq postfix
|
2017-09-14 12:29:03 +02:00
|
|
|
|
2015-11-10 14:44:38 +01:00
|
|
|
install:
|
2017-09-14 18:47:12 +02:00
|
|
|
- REMOVE_PACKAGE="friendsofphp/php-cs-fixer"; if [ "$CS_CHECK" = 1 ]; then REMOVE_PACKAGE="phpunit/phpunit"; fi; composer remove --no-update --no-scripts --dev $REMOVE_PACKAGE
|
2017-03-15 19:06:51 +01:00
|
|
|
- composer install
|
2017-09-14 12:29:03 +02:00
|
|
|
- if [ "$CODE_COVERAGE" != 1 ]; then phpenv config-rm xdebug.ini || true; fi
|
|
|
|
|
2013-02-01 15:32:12 +01:00
|
|
|
before_script:
|
|
|
|
- sudo service postfix stop
|
|
|
|
- smtp-sink -d "%d.%H.%M.%S" localhost:2500 1000 &
|
2013-12-16 14:28:57 +01:00
|
|
|
- mkdir -p build/logs
|
2015-11-11 18:13:28 +01:00
|
|
|
- cp test/testbootstrap-dist.php test/testbootstrap.php
|
|
|
|
- chmod +x test/fakesendmail.sh
|
2013-02-02 20:38:31 +01:00
|
|
|
- sudo mkdir -p /var/qmail/bin
|
2015-11-11 18:13:28 +01:00
|
|
|
- sudo cp test/fakesendmail.sh /var/qmail/bin/sendmail
|
|
|
|
- sudo cp test/fakesendmail.sh /usr/sbin/sendmail
|
2015-11-10 19:09:08 +01:00
|
|
|
- |
|
2017-03-02 15:01:03 +01:00
|
|
|
if [[ $TRAVIS_PHP_VERSION = "hhv"* ]]; then
|
|
|
|
echo 'sendmail_path = "/usr/sbin/sendmail -t -i "' >> /etc/hhvm/php.ini
|
|
|
|
else
|
2015-11-10 19:09:08 +01:00
|
|
|
echo 'sendmail_path = "/usr/sbin/sendmail -t -i "' > $(php --ini|grep -m 1 "ini files in:"|cut -d ":" -f 2)/sendmail.ini
|
|
|
|
fi
|
2017-09-14 12:29:03 +02:00
|
|
|
|
2017-09-14 18:47:12 +02:00
|
|
|
script: ./vendor/bin/phpunit --configuration ./travis.phpunit.xml.dist
|
2017-09-14 12:29:03 +02:00
|
|
|
|
2013-12-16 14:28:57 +01:00
|
|
|
after_script:
|
2017-09-14 12:29:03 +02:00
|
|
|
- if [ "$CODE_COVERAGE" = 1 ]; then wget https://scrutinizer-ci.com/ocular.phar; fi
|
|
|
|
- if [ "$CODE_COVERAGE" = 1 ]; then php ocular.phar code-coverage:upload --format=php-clover ../build/logs/clover.xml; fi
|
2017-09-14 18:47:12 +02:00
|
|
|
|
|
|
|
stages:
|
|
|
|
- coding-standard
|
|
|
|
- test
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
include:
|
|
|
|
- stage: coding-standard
|
|
|
|
before_install:
|
|
|
|
before_script:
|
|
|
|
script: ./vendor/bin/php-cs-fixer --diff --dry-run --verbose fix
|
|
|
|
after_script:
|
2019-08-02 22:30:58 +02:00
|
|
|
php: 5.6
|
2017-09-14 18:47:12 +02:00
|
|
|
env: CS_CHECK=1
|
|
|
|
- stage: test
|
|
|
|
- php: 7.0
|
|
|
|
- php: 7.1
|
|
|
|
- php: 7.2
|
2018-10-30 08:36:21 +01:00
|
|
|
- php: 7.3
|
2019-12-05 10:23:17 +01:00
|
|
|
- php: 7.4
|
2019-02-15 09:47:15 +01:00
|
|
|
env: CODE_COVERAGE=1
|
2018-03-27 15:49:45 +02:00
|
|
|
- php: nightly
|
2017-09-14 18:47:12 +02:00
|
|
|
- php: hhvm
|
|
|
|
dist: trusty
|
2019-02-15 09:45:57 +01:00
|
|
|
|
|
|
|
matrix:
|
|
|
|
allow_failures:
|
|
|
|
- php: nightly
|
|
|
|
- php: hhvm
|