summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTitouan Galopin <[email protected]>2018-11-25 00:12:00 +0100
committerTitouan Galopin <[email protected]>2018-11-25 00:32:41 +0100
commitd39a98a478c95e0df86ed564650f7326244116e2 (patch)
tree74ab2ce17fe30b84c8e3643df3b077ee407a494d
parentc76378a560eeefa900429989fb6e85859f3a6b5e (diff)
Improve Travis configuration, add PHP-CS-Fixer and update PHPUnit minimum version
-rw-r--r--.gitignore3
-rw-r--r--.travis.yml47
-rw-r--r--composer.json2
3 files changed, 27 insertions, 25 deletions
diff --git a/.gitignore b/.gitignore
index f9ead4a..1fa9e58 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,5 @@
vendor/
scratch.php
composer.lock
-build/ \ No newline at end of file
+build/
+.php_cs.cache
diff --git a/.travis.yml b/.travis.yml
index 9f4f2fb..c69d1ed 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,40 +1,41 @@
language: php
-
+dist: trusty
sudo: false
-php:
- - 5.4
- - 5.5
- - 5.6
- - 7.0
- - 7.1
- - 7.2
- - hhvm
-
matrix:
- include:
- - php: 5.3
- dist: precise
- fast_finish: true
-
-dist: trusty
+ include:
+ - php: 5.3
+ dist: precise
+ - php: 5.4
+ - php: 5.5
+ - php: 5.6
+ env: SCRUTINIZER=1
+ - php: 7.0
+ env: COMPOSER_FLAGS="--prefer-lowest"
+ - php: 7.1
+ env: CS_FIXER=1
+ - php: 7.2
+ env: BENCHMARK=1
+ - php: hhvm
+ fast_finish: true
cache:
directories:
- $HOME/.composer/cache
-notifications:
- irc: "irc.freenode.net#masterminds"
-
before_script:
- composer self-update
- - composer install
+ - composer update $COMPOSER_FLAGS --prefer-dist
script:
+ - stty cols 120
+ - if [ "$CS_FIXER" == 1 ]; then wget https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v2.13.1/php-cs-fixer.phar && php php-cs-fixer.phar fix . --dry-run --diff --rules="@Symfony"; fi
- mkdir -p build/logs
- ./vendor/bin/phpunit --coverage-clover=coverage.xml
after_script:
- - bash -c 'if [ "$TRAVIS_PHP_VERSION" == "5.6" ] ; then wget https://scrutinizer-ci.com/ocular.phar; fi;'
- - bash -c 'if [ "$TRAVIS_PHP_VERSION" == "5.6" ] ; then php ocular.phar code-coverage:upload --format=php-clover coverage.xml; fi;'
- - php test/benchmark/run.php 10
+ - if [ "$SCRUTINIZER" == 1 ]; then wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover coverage.xml; fi
+ - if [ "$BENCHMARK" == 1 ]; then php test/benchmark/run.php 10; fi
+
+notifications:
+ irc: "irc.freenode.net#masterminds"
diff --git a/composer.json b/composer.json
index b7278c6..1e59a69 100644
--- a/composer.json
+++ b/composer.json
@@ -27,7 +27,7 @@
},
"require-dev": {
"satooshi/php-coveralls": "1.0.*",
- "phpunit/phpunit" : "4.*",
+ "phpunit/phpunit" : "^4.8.35",
"sami/sami": "~2.0"
},
"autoload": {