Skip to content

Commit

Permalink
Merge 1af0321 into 01e0a40
Browse files Browse the repository at this point in the history
  • Loading branch information
ADmad committed Jul 28, 2019
2 parents 01e0a40 + 1af0321 commit db0ffc4
Showing 1 changed file with 27 additions and 29 deletions.
56 changes: 27 additions & 29 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,56 +5,54 @@ php:
- 7.0
- 7.1
- 7.2

sudo: false
- 7.3

env:
matrix:
- DB=mysql db_dsn='mysql://travis@0.0.0.0/cakephp_test'
- DB=mysql db_dsn='mysql://root@127.0.0.1/cakephp_test'
- DB=pgsql db_dsn='postgres://postgres@127.0.0.1/cakephp_test'
- DB=sqlite db_dsn='sqlite:///:memory:'

global:
- DEFAULT=1

matrix:
allow_failures:
- php: hhvm

fast_finish: true

include:
- php: 5.6
- php: 7.3
env: PHPCS=1 DEFAULT=0

- php: 5.6
env: COVERALLS=1 DEFAULT=0

- php: hhvm
env: HHVM=1 DB=sqlite db_dsn='sqlite:///:memory:'

- php: hhvm
env: HHVM=1 DB=mysql db_dsn='mysql://travis@0.0.0.0/cakephp_test'
env: PREFER_LOWEST=1

before_script:
- composer self-update
- composer install --prefer-source --no-interaction

- sh -c "if [ '$DB' = 'mysql' ]; then if [ '$DOCKER' = '1' ]; then apt-get -qq install -qq -y mysql-server && service mysql start; fi; mysql -e 'CREATE DATABASE cakephp_test;'; fi"

- sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'CREATE DATABASE cakephp_test;' -U postgres; fi"

- sh -c "if [ '$PHPCS' = '1' ]; then composer require 'cakephp/cakephp-codesniffer:dev-master'; fi"
- if [[ $TRAVIS_PHP_VERSION != 7.3 ]]; then phpenv config-rm xdebug.ini; fi

- sh -c "if [ '$COVERALLS' = '1' ]; then composer require --dev satooshi/php-coveralls; fi"
- sh -c "if [ '$COVERALLS' = '1' ]; then mkdir -p build/logs; fi"
- if [[ $PREFER_LOWEST != 1 ]]; then composer update --no-interaction; fi
- if [[ $PREFER_LOWEST == 1 ]]; then composer update --no-interaction --prefer-lowest --prefer-stable; fi

- command -v phpenv > /dev/null && phpenv rehash || true
- if [[ $DB = 'mysql' ]]; then mysql -e 'CREATE DATABASE cakephp_test;'; fi
- if [[ $DB = 'pgsql' ]]; then psql -c 'CREATE DATABASE cakephp_test;' -U postgres; fi

script:
- sh -c "if [ '$COVERALLS' = '1' ]; then vendor/bin/phpunit --stderr --coverage-clover build/logs/clover.xml; fi"
- sh -c "if [ '$COVERALLS' = '1' ]; then php vendor/bin/php-coveralls -v; fi"
- sh -c "if [ '$DEFAULT' = '1' ]; then vendor/bin/phpunit --stderr; fi"
- sh -c "if [ '$PHPCS' = '1' ]; then vendor/bin/phpcs -n -p --extensions=php --standard=vendor/cakephp/cakephp-codesniffer/CakePHP ./src ./tests; fi"
- |
if [[ $DEFAULT = 1 && $TRAVIS_PHP_VERSION = 7.3 ]]; then
mkdir -p build/logs
vendor/bin/phpunit --coverage-clover=build/logs/clover.xml
fi
- if [[ $DEFAULT = 1 && $TRAVIS_PHP_VERSION != 7.3 ]]; then vendor/bin/phpunit; fi

- if [[ $PHPCS = 1 ]]; then vendor/bin/phpcs -n -p --extensions=php --standard=vendor/cakephp/cakephp-codesniffer/CakePHP ./src ./tests; fi

after_success:
- |
if [[ $DEFAULT = 1 && $TRAVIS_PHP_VERSION = 7.3 ]]; then
wget https://github.com/php-coveralls/php-coveralls/releases/download/v2.1.0/php-coveralls.phar
chmod +x php-coveralls.phar
./php-coveralls.phar
fi
notifications:
email: false

0 comments on commit db0ffc4

Please sign in to comment.