2017-02-08 15:59:12 +01:00
|
|
|
language: php
|
2017-09-09 09:10:44 +02:00
|
|
|
dist: trusty
|
2017-09-19 16:09:06 +02:00
|
|
|
sudo: false
|
2017-02-08 15:59:12 +01:00
|
|
|
|
|
|
|
php:
|
|
|
|
- '5.6'
|
|
|
|
- '7.0'
|
|
|
|
- '7.1'
|
2017-12-04 18:29:54 +01:00
|
|
|
- '7.2'
|
2018-11-27 11:30:45 +01:00
|
|
|
- '7.3'
|
2017-12-04 18:29:54 +01:00
|
|
|
- nightly
|
|
|
|
|
2018-12-05 11:29:32 +01:00
|
|
|
env:
|
|
|
|
- CHECK=phpunit
|
|
|
|
|
2017-12-04 18:29:54 +01:00
|
|
|
matrix:
|
2018-12-05 11:29:32 +01:00
|
|
|
include:
|
|
|
|
- env: CHECK=phpcs
|
|
|
|
php: '7.3'
|
|
|
|
- env: CHECK=phpcs
|
|
|
|
php: '7.0'
|
|
|
|
- env: CHECK=phpcs
|
|
|
|
php: '5.6'
|
2018-12-05 11:33:10 +01:00
|
|
|
- env: CHECK=syntax
|
|
|
|
php: 'nightly'
|
|
|
|
- env: CHECK=syntax
|
|
|
|
php: '7.3'
|
|
|
|
- env: CHECK=syntax
|
|
|
|
php: '7.0'
|
|
|
|
- env: CHECK=syntax
|
|
|
|
php: '5.6'
|
2017-12-04 18:29:54 +01:00
|
|
|
allow_failures:
|
|
|
|
- php: nightly
|
2017-02-08 15:59:12 +01:00
|
|
|
|
|
|
|
services:
|
|
|
|
- mysql
|
|
|
|
- postgresql
|
|
|
|
|
|
|
|
cache:
|
|
|
|
directories:
|
|
|
|
- vendor
|
|
|
|
|
|
|
|
branches:
|
|
|
|
only:
|
|
|
|
- master
|
|
|
|
- /^v\d/
|
|
|
|
|
|
|
|
notifications:
|
|
|
|
email: false
|
|
|
|
|
|
|
|
# also see: test/setup_vendor.sh
|
|
|
|
before_script:
|
2017-10-23 10:32:45 +02:00
|
|
|
- php -m
|
2018-12-05 11:29:32 +01:00
|
|
|
- '[ -z $LOCALE_GEN ] || sudo locale-gen en_US.UTF-8 de_DE.UTF-8 fr_FR.UTF-8'
|
|
|
|
- '[ -z $ENABLE_LDAP ] || phpenv config-add test/travis-ldap.ini'
|
2017-02-08 15:59:12 +01:00
|
|
|
- test/setup_vendor.sh
|
2018-12-05 11:29:32 +01:00
|
|
|
- 'if [ "$CHECK" = phpunit ]; then test/travis_database.sh; fi'
|
2017-02-08 15:59:12 +01:00
|
|
|
|
|
|
|
script:
|
|
|
|
# also see: modules/test/application/clicommands/PhpCommand.php
|
2018-12-05 14:05:46 +01:00
|
|
|
- 'if [ "$CHECK" = phpcs ]; then php vendor/phpcs.phar; fi'
|
|
|
|
- 'if [ "$CHECK" = phpunit ]; then php vendor/phpunit.phar -c modules/test/phpunit.xml --verbose; fi'
|
2018-12-05 11:33:10 +01:00
|
|
|
- 'if [ "$CHECK" = syntax ]; then php test/check-syntax.php -e "^(\./)?vendor/" -e Icinga/Util/String.php; fi'
|