From db9051dcde7dd8ec22bb33570155dd68f21f5de3 Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Sun, 17 Apr 2016 19:34:16 +0200 Subject: [PATCH] Added CI config files --- .scrutinizer.yml | 6 +++++ .travis.yml | 26 +++++++++++++++++++ composer.json | 2 +- .../autoload/middleware-pipeline.global.php | 2 +- config/autoload/routes.global.php | 4 +-- 5 files changed, 36 insertions(+), 4 deletions(-) create mode 100644 .scrutinizer.yml create mode 100644 .travis.yml diff --git a/.scrutinizer.yml b/.scrutinizer.yml new file mode 100644 index 00000000..692b0397 --- /dev/null +++ b/.scrutinizer.yml @@ -0,0 +1,6 @@ +tools: + external_code_coverage: true +checks: + php: + code_rating: true + duplication: true diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000..77f1332b --- /dev/null +++ b/.travis.yml @@ -0,0 +1,26 @@ +language: php + +branches: + only: + - master + - develop + +php: + - 5.5 + - 5.6 + - 7 + - hhvm + +before_script: + - composer self-update + - composer install --no-interaction + +script: + - mkdir build + - composer check + +after_script: + - wget https://scrutinizer-ci.com/ocular.phar + - php ocular.phar code-coverage:upload --format=php-clover build/clover.xml + +sudo: false diff --git a/composer.json b/composer.json index a1b5cf56..486334ef 100644 --- a/composer.json +++ b/composer.json @@ -46,7 +46,7 @@ "cs": "phpcs", "cs-fix": "phpcbf", "serve": "php -S 0.0.0.0:8000 -t public/", - "test": "phpunit", + "test": "phpunit --coverage-clover build/clover.xml", "pretty-test": "phpunit --coverage-html build/coverage" } } diff --git a/config/autoload/middleware-pipeline.global.php b/config/autoload/middleware-pipeline.global.php index 9f5f2d63..8a393ce1 100644 --- a/config/autoload/middleware-pipeline.global.php +++ b/config/autoload/middleware-pipeline.global.php @@ -3,7 +3,7 @@ use Zend\Expressive\Container\ApplicationFactory; use Zend\Expressive\Helper; return [ - + 'middleware_pipeline' => [ 'always' => [ 'middleware' => [ diff --git a/config/autoload/routes.global.php b/config/autoload/routes.global.php index 314cbd98..48522662 100644 --- a/config/autoload/routes.global.php +++ b/config/autoload/routes.global.php @@ -7,10 +7,10 @@ return [ 'name' => 'home', 'path' => '/', 'middleware' => function ($req, $resp) { - + }, 'allowed_methods' => ['GET'], ], ], - + ];