Skip to content

Commit

Permalink
Include prefer lowest and simplify checks
Browse files Browse the repository at this point in the history
  • Loading branch information
dereuromark committed Jan 4, 2019
1 parent 3c5fccf commit 4851069
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
25 changes: 12 additions & 13 deletions .travis.yml
Expand Up @@ -3,7 +3,6 @@ language: php
php:
- 7.0
- 5.6
- 7.1
- 7.2
- 7.3

Expand All @@ -17,7 +16,7 @@ env:
global:
- DEFAULT=1
- CODECOVERAGE=0
- PHPCS=0
- CHECKS=0

services:
- memcached
Expand All @@ -37,13 +36,13 @@ matrix:
fast_finish: true

include:
- php: 5.6
env: PREFER_LOWEST=1

- php: 7.0
env: PHPCS=1 DEFAULT=0
env: CHECKS=1 DEFAULT=0

- php: 7.1
env: PHPSTAN=1 DEFAULT=0

- php: 7.2
env: CODECOVERAGE=1 DEFAULT=0

before_install:
Expand All @@ -58,14 +57,14 @@ before_install:
- if [ $DB = 'pgsql' ]; then psql -c 'CREATE SCHEMA test2;' -U postgres -d cakephp_test; fi
- if [ $DB = 'pgsql' ]; then psql -c 'CREATE SCHEMA test3;' -U postgres -d cakephp_test; fi

- if [[ $PHPCS = 0 ]] ; then pecl channel-update pecl.php.net; fi;
- pecl channel-update pecl.php.net
- |
if [[ ${TRAVIS_PHP_VERSION} != "7.3" && ${TRAVIS_PHP_VERSION} != "5.6" && ($DEFAULT = 1 || $PHPSTAN = 1) ]]; then
if [[ ${TRAVIS_PHP_VERSION} != "7.3" && ${TRAVIS_PHP_VERSION} != "5.6" ]]; then
echo 'extension = memcached.so' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini;
fi
- if [[ $PHPCS = 0 ]] ; then echo 'extension = redis.so' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi
- if [[ $PHPCS = 0 ]] ; then echo 'extension = apcu.so' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi
- if [[ $PHPCS = 0 ]] ; then echo 'apc.enable_cli = 1' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi
- echo 'extension = redis.so' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- echo 'extension = apcu.so' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- echo 'apc.enable_cli = 1' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini

- if [[ ${TRAVIS_PHP_VERSION:0:1} == "7" ]] ; then echo "yes" | pecl install channel://pecl.php.net/apcu-5.1.5 || true; fi
- if [[ ${TRAVIS_PHP_VERSION:0:1} == "5" ]] ; then echo "yes" | pecl install apcu-4.0.11 || true; fi
Expand All @@ -90,8 +89,8 @@ script:
- if [[ $DEFAULT = 1 ]]; then vendor/bin/phpunit; fi
- if [[ $CODECOVERAGE = 1 ]]; then phpdbg -qrr vendor/bin/phpunit --coverage-clover=clover.xml; fi

- if [[ $PHPCS = 1 ]]; then composer cs-check; fi
- if [[ $PHPSTAN = 1 ]]; then composer require --dev "phpstan/phpstan:^0.10" && vendor/bin/phpstan analyse -c phpstan.neon -l 2 src; fi
- if [[ $CHECKS = 1 ]]; then composer require --dev "phpstan/phpstan:^0.10" && vendor/bin/phpstan analyse -c phpstan.neon -l 2 src/; fi
- if [[ $CHECKS = 1 ]]; then composer cs-check; fi

after_success:
- if [[ $CODECOVERAGE = 1 ]]; then bash <(curl -s https://codecov.io/bash); fi
Expand Down
5 changes: 3 additions & 2 deletions composer.json
Expand Up @@ -43,8 +43,9 @@
"lib-ICU": "The intl PHP library, to use Text::transliterate() or Text::slug()"
},
"require-dev": {
"phpunit/phpunit": "^5.7.14|^6.0",
"cakephp/cakephp-codesniffer": "^3.0"
"cakephp/cakephp-codesniffer": "^3.0",
"cakephp/chronos": "^1.2.1",
"phpunit/phpunit": "^5.7.14|^6.0"
},
"autoload": {
"psr-4": {
Expand Down

0 comments on commit 4851069

Please sign in to comment.