1
0
Fork 0
composer/.travis.yml

83 lines
2.2 KiB
YAML
Raw Normal View History

2011-11-13 17:48:51 +00:00
language: php
2017-06-17 12:39:23 +00:00
dist: trusty
2017-06-22 12:33:13 +00:00
git:
depth: 5
cache:
directories:
- $HOME/.composer/cache
addons:
apt:
packages:
- parallel
matrix:
2017-06-17 12:39:23 +00:00
include:
- php: 5.3
dist: precise
- php: 5.4
- php: 5.5
- php: 5.6
- php: 7.0
- php: 7.1
- php: 7.2
- php: 7.3
2019-01-07 15:22:41 +00:00
env: PHPSTAN=1
- php: 7.3
2019-01-07 15:22:41 +00:00
env:
- deps=high
- php: nightly
2019-07-14 12:25:01 +00:00
- php: 7.4snapshot
fast_finish: true
2015-10-27 10:12:43 +00:00
allow_failures:
- php: nightly
2019-07-16 11:41:39 +00:00
- php: 7.4snapshot
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
- composer validate
2017-06-22 12:33:13 +00:00
install:
2019-01-02 14:38:07 +00:00
# flags to pass to install
- flags="--ansi --prefer-dist --no-interaction --optimize-autoloader --no-suggest --no-progress"
# update deps to latest in case of high deps build
- if [ "$deps" == "high" ]; then composer config platform.php 7.2.4; composer update $flags; fi
# 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:
2019-01-02 14:38:07 +00:00
# run test suite directories in parallel using GNU parallel
- ls -d tests/Composer/Test/* | grep -v TestCase.php | parallel --gnu --keep-order 'echo "Running {} tests"; ./vendor/bin/phpunit -c tests/complete.phpunit.xml --colors=always {} || (echo -e "\e[41mFAILED\e[0m {}" && exit 1);'
2019-01-07 15:22:41 +00:00
# Run PHPStan
- if [[ $PHPSTAN == "1" ]]; then
bin/composer require --dev phpstan/phpstan-shim:^0.11 --ignore-platform-reqs &&
2019-01-07 15:22:41 +00:00
vendor/bin/phpstan.phar analyse src tests --configuration=phpstan/config.neon --autoload-file=phpstan/autoload.php;
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
2018-10-17 06:53:19 +00:00
php: '7.2'