2013-07-26 02:50:54 +04:00
|
|
|
language: php
|
2016-11-11 23:22:46 +03:00
|
|
|
|
2016-11-24 11:30:41 +03:00
|
|
|
sudo: false
|
|
|
|
|
|
|
|
cache:
|
|
|
|
directories:
|
|
|
|
- $HOME/.composer/cache/files
|
|
|
|
|
2013-07-26 02:50:54 +04:00
|
|
|
php:
|
2016-11-24 11:30:41 +03:00
|
|
|
- 7.1
|
2017-12-01 22:55:29 +03:00
|
|
|
- 7.2
|
2019-01-06 11:01:37 +03:00
|
|
|
- 7.3
|
|
|
|
|
|
|
|
branches:
|
|
|
|
except:
|
|
|
|
- /^analysis-.*$/
|
|
|
|
- /^patch-.*$/
|
2016-11-11 23:22:46 +03:00
|
|
|
|
2017-04-08 11:43:04 +03:00
|
|
|
env:
|
|
|
|
- TEST_COMMAND="composer test-all"
|
|
|
|
|
2016-11-24 11:30:41 +03:00
|
|
|
matrix:
|
|
|
|
fast_finish: true
|
|
|
|
include:
|
2019-01-06 11:01:37 +03:00
|
|
|
- php: 7.1
|
2017-04-08 12:22:20 +03:00
|
|
|
env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" PREFER_COVERAGE=true
|
2016-11-24 11:30:41 +03:00
|
|
|
|
2015-04-18 22:20:26 +03:00
|
|
|
install:
|
2016-11-24 11:30:41 +03:00
|
|
|
- travis_retry composer update ${COMPOSER_FLAGS} --prefer-source --no-interaction
|
|
|
|
|
|
|
|
before_script:
|
2017-04-08 11:43:04 +03:00
|
|
|
- if [[ "COVERAGE" = true ]]; then TEST_COMMAND="composer test-coverage"; fi
|
2017-04-08 12:22:20 +03:00
|
|
|
- if ! [[ "$TRAVIS_PULL_REQUEST" = false ]]; then TEST_COMMAND="composer test"; fi
|
|
|
|
- if [[ "$PREFER_COVERAGE" = true ]] && [[ "$TRAVIS_PULL_REQUEST" = false ]]; then TEST_COMMAND="composer test-coverage" COVERAGE=true; fi
|
2016-11-11 23:22:46 +03:00
|
|
|
|
2015-04-18 22:20:26 +03:00
|
|
|
script:
|
2019-01-06 11:01:37 +03:00
|
|
|
- composer validate --strict --no-check-lock
|
2016-11-24 11:30:41 +03:00
|
|
|
- echo $TEST_COMMAND
|
|
|
|
- $TEST_COMMAND
|
|
|
|
|
|
|
|
after_success:
|
|
|
|
- if [[ "$COVERAGE" = true ]]; then wget https://scrutinizer-ci.com/ocular.phar; fi
|
|
|
|
- if [[ "$COVERAGE" = true ]]; then php ocular.phar code-coverage:upload --format=php-clover build/coverage.xml; fi
|