Skip to content

Commit

Permalink
Enable code-coverage, tests and badges
Browse files Browse the repository at this point in the history
  • Loading branch information
lisachenko committed Feb 23, 2016
1 parent bc3f0b4 commit 96dddcb
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 6 deletions.
34 changes: 34 additions & 0 deletions .scrutinizer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
before_commands:
- "composer install --no-dev --prefer-source"

tools:
external_code_coverage:
timeout: 1200
php_code_coverage:
enabled: true
php_code_sniffer:
enabled: true
config:
standard: PSR2
filter:
paths: ["src/*"]
php_cpd:
enabled: true
excluded_dirs: ["docs", "demo", "tests", "vendor"]
php_cs_fixer:
enabled: true
config:
level: all
filter:
paths: ["src/*"]
php_loc:
enabled: true
excluded_dirs: ["docs", "demo", "tests", "vendor"]
php_pdepend:
enabled: true
excluded_dirs: ["docs", "demo", "tests", "vendor"]
php_analyzer:
enabled: true
filter:
paths: ["src/*"]
sensiolabs_security_checker: true
5 changes: 5 additions & 0 deletions .travis.coverage.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
set -x
if [ "$TRAVIS_PHP_VERSION" = '7.0' ] ; then
wget https://scrutinizer-ci.com/ocular.phar
php ocular.phar code-coverage:upload --format=php-clover ./clover.xml
fi
17 changes: 14 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,19 @@ language: php

php:
- 5.5
- 5.4
- 5.3
- 5.6
- 7.0
- hhvm

before_script:
- composer --prefer-source --dev install
- composer install

script:
- phpunit --verbose --coverage-text --coverage-clover=clover.xml --colors

after_script:
- sh .travis.coverage.sh

matrix:
allow_failures:
- php: hhvm
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,12 @@ break a caller, C++ FAQs uses the memorable phrase "require no more, promise no
does not require more from the caller than before, and if it does not promise to deliver less than before,
then the new specification is compatible with the old, and will not break the caller.

[![Latest Unstable Version](https://poser.pugx.org/lisachenko/php-deal/v/unstable.png)](https://packagist.org/packages/lisachenko/php-deal)
[![License](https://poser.pugx.org/lisachenko/php-deal/license.png)](https://packagist.org/packages/lisachenko/php-deal)

[![Build Status](https://secure.travis-ci.org/lisachenko/php-deal.png?branch=master)](https://travis-ci.org/lisachenko/php-deal)
[![GitHub release](https://img.shields.io/github/release/lisachenko/php-deal.svg)](https://github.com/lisachenko/php-deal/releases/latest)
[![Code Coverage](https://scrutinizer-ci.com/g/lisachenko/php-deal/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/lisachenko/php-deal/?branch=master)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/lisachenko/php-deal/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/lisachenko/php-deal/?branch=master)
[![Minimum PHP Version](http://img.shields.io/badge/php-%3E%3D%205.5-8892BF.svg)](https://php.net/)
[![License](https://img.shields.io/packagist/l/lisachenko/php-deal.svg)](https://packagist.org/packages/lisachenko/php-deal)
Installation
------------

Expand Down

0 comments on commit 96dddcb

Please sign in to comment.