2011-11-13 17:48:51 +00:00
|
|
|
language: php
|
|
|
|
|
2020-02-10 07:39:49 +00:00
|
|
|
dist: bionic
|
2015-03-04 15:48:39 +00:00
|
|
|
|
2017-06-22 12:33:13 +00:00
|
|
|
git:
|
|
|
|
depth: 5
|
|
|
|
|
2015-03-04 15:48:39 +00:00
|
|
|
cache:
|
|
|
|
directories:
|
|
|
|
- $HOME/.composer/cache
|
|
|
|
|
2015-03-08 17:30:56 +00:00
|
|
|
matrix:
|
2017-06-17 12:39:23 +00:00
|
|
|
include:
|
2018-03-29 21:28:02 +00:00
|
|
|
- php: 5.3
|
|
|
|
dist: precise
|
2019-01-02 14:45:25 +00:00
|
|
|
- php: 5.4
|
2020-02-10 07:39:49 +00:00
|
|
|
dist: trusty
|
2019-01-02 14:45:25 +00:00
|
|
|
- php: 5.5
|
2020-02-10 07:39:49 +00:00
|
|
|
dist: trusty
|
2019-01-02 14:45:25 +00:00
|
|
|
- php: 5.6
|
2020-02-10 07:39:49 +00:00
|
|
|
dist: xenial
|
2019-01-02 14:45:25 +00:00
|
|
|
- php: 7.0
|
2020-02-10 07:39:49 +00:00
|
|
|
dist: xenial
|
2019-01-02 14:45:25 +00:00
|
|
|
- php: 7.1
|
2020-02-10 07:39:49 +00:00
|
|
|
dist: xenial
|
2019-01-02 14:45:25 +00:00
|
|
|
- php: 7.2
|
2020-02-10 07:39:49 +00:00
|
|
|
dist: xenial
|
2019-01-02 14:45:25 +00:00
|
|
|
- php: 7.3
|
2020-02-10 07:39:49 +00:00
|
|
|
dist: xenial
|
2020-02-07 22:23:48 +00:00
|
|
|
# Regular 7.4 build with locked deps
|
|
|
|
- php: 7.4
|
|
|
|
env:
|
|
|
|
- SYMFONY_PHPUNIT_VERSION=7.5
|
|
|
|
# High deps check
|
2020-02-07 03:18:45 +00:00
|
|
|
- php: 7.4
|
2019-12-08 01:38:22 +00:00
|
|
|
env:
|
|
|
|
- deps=high
|
2020-02-07 03:18:45 +00:00
|
|
|
- SYMFONY_PHPUNIT_VERSION=7.5
|
2020-02-07 22:23:48 +00:00
|
|
|
# PHPStan checks
|
2020-02-07 21:20:51 +00:00
|
|
|
- php: 7.4
|
2019-01-07 15:22:41 +00:00
|
|
|
env:
|
|
|
|
- deps=high
|
2020-02-07 21:20:51 +00:00
|
|
|
- PHPSTAN=1
|
2020-02-07 21:49:17 +00:00
|
|
|
- SYMFONY_PHPUNIT_VERSION=7.5
|
2020-02-07 21:35:57 +00:00
|
|
|
- php: nightly
|
2015-03-09 08:22:39 +00:00
|
|
|
fast_finish: true
|
2015-10-27 10:12:43 +00:00
|
|
|
allow_failures:
|
|
|
|
- php: nightly
|
2013-12-19 15:33:37 +00:00
|
|
|
|
2017-06-22 12:33:13 +00:00
|
|
|
before_install:
|
2019-11-03 13:04:38 +00:00
|
|
|
# disable Xdebug if available
|
2019-01-02 14:38:07 +00:00
|
|
|
- phpenv config-rm xdebug.ini || echo "xdebug not available"
|
|
|
|
# disable default memory limit
|
|
|
|
- export INI=~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
|
|
|
|
- echo memory_limit = -1 >> $INI
|
2019-01-03 09:52:49 +00:00
|
|
|
- composer validate
|
2017-06-22 12:33:13 +00:00
|
|
|
|
|
|
|
install:
|
2019-01-02 14:38:07 +00:00
|
|
|
# flags to pass to install
|
2020-02-13 15:22:53 +00:00
|
|
|
- flags="--ansi --prefer-dist --no-interaction --optimize-autoloader --no-progress"
|
2019-01-02 14:38:07 +00:00
|
|
|
# update deps to latest in case of high deps build
|
2020-02-07 21:49:17 +00:00
|
|
|
- if [ "$deps" == "high" ]; then composer config platform.php 7.4.0; composer update $flags; fi
|
2019-01-02 14:38:07 +00:00
|
|
|
# install dependencies using system provided composer binary
|
|
|
|
- composer install $flags
|
|
|
|
# install dependencies using composer from source
|
|
|
|
- bin/composer install $flags
|
2017-06-22 12:33:13 +00:00
|
|
|
|
|
|
|
before_script:
|
2019-01-02 14:38:07 +00:00
|
|
|
# make sure git tests do not complain about user/email not being set
|
|
|
|
- git config --global user.name travis-ci
|
|
|
|
- git config --global user.email travis@example.com
|
2011-11-13 18:01:46 +00:00
|
|
|
|
2013-09-25 08:14:42 +00:00
|
|
|
script:
|
2020-04-12 19:54:51 +00:00
|
|
|
- ( set -e; for f in $(find src/ -name *.php); do php -l "$f" || exit 1; done )
|
2019-01-07 15:22:41 +00:00
|
|
|
- if [[ $PHPSTAN == "1" ]]; then
|
2020-02-07 21:49:17 +00:00
|
|
|
bin/composer require --dev phpstan/phpstan:^0.12 phpunit/phpunit:^7.5 --no-update &&
|
2020-04-07 12:40:51 +00:00
|
|
|
bin/composer update phpstan/* phpunit/* sebastian/* --with-all-dependencies &&
|
2019-12-08 01:38:22 +00:00
|
|
|
vendor/bin/phpstan analyse --configuration=phpstan/config.neon;
|
2020-02-07 21:49:17 +00:00
|
|
|
else
|
|
|
|
vendor/bin/simple-phpunit;
|
2019-01-07 15:22:41 +00:00
|
|
|
fi
|
2017-11-29 22:52:13 +00:00
|
|
|
|
|
|
|
before_deploy:
|
2019-01-02 14:38:07 +00:00
|
|
|
- php -d phar.readonly=0 bin/compile
|
2017-11-15 06:25:16 +00:00
|
|
|
|
|
|
|
deploy:
|
|
|
|
provider: releases
|
|
|
|
api_key: $GITHUB_TOKEN
|
|
|
|
file: composer.phar
|
|
|
|
skip_cleanup: true
|
|
|
|
on:
|
|
|
|
tags: true
|
|
|
|
repo: composer/composer
|
2020-02-07 21:20:51 +00:00
|
|
|
php: '7.3'
|