Skip to content

Commit

Permalink
Add coveralls
Browse files Browse the repository at this point in the history
  • Loading branch information
sci3ma committed Nov 25, 2019
1 parent a2ea254 commit 8b57a38
Show file tree
Hide file tree
Showing 8 changed files with 77 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ phpunit.xml.dist.scbak
config/cli-config.php
coverage.sh
!src/dist/coverage.sh
coverage.xml
build/logs/clover.xml
bin/.phpunit
build/*
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,7 @@ script:
- vendor/bin/grumphp run
- bin/symfony-grumphp install -q
- bin/symfony-grumphp uninstall -q

after_success:
- bin/symfony-grumphp install -q
- vendor/bin/php-coveralls -v
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Symfony + GrumPHP
[![Packagist (custom server)](https://img.shields.io/packagist/dt/sci3ma/symfony-grumphp?style=flat-square)](https://packagist.org/packages/sci3ma/symfony-grumphp/stats)
[![GitHub last commit](https://img.shields.io/github/last-commit/sci3ma/symfony-grumphp?style=flat-square&logo=github)](https://github.com/sci3ma/symfony-grumphp/commits/master)
[![Travis (.org)](https://img.shields.io/travis/sci3ma/symfony-grumphp?style=flat-square&logo=travis-ci)](https://travis-ci.org/sci3ma/symfony-grumphp)
[![Coveralls github](https://img.shields.io/coveralls/github/sci3ma/symfony-grumphp?logo=coveralls&style=flat-square)](https://coveralls.io/github/sci3ma/symfony-grumphp)

Included tools
--------------
Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"thecodingmachine/phpstan-strict-rules": "^0.11.2"
},
"require-dev": {
"php-coveralls/php-coveralls": "^2.2"
},
"autoload": {
"psr-4": {
Expand Down
63 changes: 63 additions & 0 deletions coverage.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<?xml version="1.0" encoding="UTF-8"?>
<coverage generated="1574698968">
<project timestamp="1574698968">
<package name="MH\SymfonyGrumPHP\Command">
<file name="/var/www/symfony-grumphp/src/Command/AbstractCommand.php">
<class name="MH\SymfonyGrumPHP\Command\AbstractCommand" namespace="MH\SymfonyGrumPHP\Command">
<metrics complexity="2" methods="2" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="2" coveredstatements="0" elements="4" coveredelements="0"/>
</class>
<line num="30" type="method" name="normalizeSourceFile" visibility="protected" complexity="1" crap="2.00" count="0"/>
<line num="32" type="stmt" count="0"/>
<line num="40" type="method" name="normalizeDestinationFile" visibility="protected" complexity="1" crap="2.00" count="0"/>
<line num="42" type="stmt" count="0"/>
<metrics loc="44" ncloc="28" classes="1" methods="2" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="2" coveredstatements="0" elements="4" coveredelements="0"/>
</file>
<file name="/var/www/symfony-grumphp/src/Command/InstallCommand.php">
<class name="MH\SymfonyGrumPHP\Command\InstallCommand" namespace="MH\SymfonyGrumPHP\Command">
<metrics complexity="5" methods="2" coveredmethods="2" conditionals="0" coveredconditionals="0" statements="16" coveredstatements="16" elements="18" coveredelements="18"/>
</class>
<line num="25" type="method" name="configure" visibility="protected" complexity="1" crap="1" count="2"/>
<line num="28" type="stmt" count="2"/>
<line num="29" type="stmt" count="2"/>
<line num="30" type="stmt" count="2"/>
<line num="35" type="method" name="execute" visibility="protected" complexity="4" crap="4" count="1"/>
<line num="37" type="stmt" count="1"/>
<line num="39" type="stmt" count="1"/>
<line num="40" type="stmt" count="1"/>
<line num="41" type="stmt" count="1"/>
<line num="42" type="stmt" count="1"/>
<line num="44" type="stmt" count="1"/>
<line num="45" type="stmt" count="1"/>
<line num="46" type="stmt" count="1"/>
<line num="49" type="stmt" count="1"/>
<line num="50" type="stmt" count="1"/>
<line num="54" type="stmt" count="1"/>
<line num="55" type="stmt" count="1"/>
<line num="57" type="stmt" count="1"/>
<metrics loc="58" ncloc="46" classes="1" methods="2" coveredmethods="2" conditionals="0" coveredconditionals="0" statements="16" coveredstatements="16" elements="18" coveredelements="18"/>
</file>
<file name="/var/www/symfony-grumphp/src/Command/UninstallCommand.php">
<class name="MH\SymfonyGrumPHP\Command\UninstallCommand" namespace="MH\SymfonyGrumPHP\Command">
<metrics complexity="4" methods="2" coveredmethods="2" conditionals="0" coveredconditionals="0" statements="13" coveredstatements="13" elements="15" coveredelements="15"/>
</class>
<line num="25" type="method" name="configure" visibility="protected" complexity="1" crap="1" count="2"/>
<line num="28" type="stmt" count="2"/>
<line num="29" type="stmt" count="2"/>
<line num="30" type="stmt" count="2"/>
<line num="35" type="method" name="execute" visibility="protected" complexity="3" crap="3" count="1"/>
<line num="37" type="stmt" count="1"/>
<line num="38" type="stmt" count="1"/>
<line num="39" type="stmt" count="1"/>
<line num="40" type="stmt" count="1"/>
<line num="41" type="stmt" count="1"/>
<line num="42" type="stmt" count="1"/>
<line num="43" type="stmt" count="1"/>
<line num="44" type="stmt" count="1"/>
<line num="45" type="stmt" count="1"/>
<line num="48" type="stmt" count="1"/>
<metrics loc="49" ncloc="37" classes="1" methods="2" coveredmethods="2" conditionals="0" coveredconditionals="0" statements="13" coveredstatements="13" elements="15" coveredelements="15"/>
</file>
</package>
<metrics files="3" loc="151" ncloc="111" classes="3" methods="6" coveredmethods="4" conditionals="0" coveredconditionals="0" statements="31" coveredstatements="29" elements="37" coveredelements="33"/>
</project>
</coverage>
2 changes: 1 addition & 1 deletion src/dist/coverage.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash

./bin/phpunit --coverage-clover coverage.xml
./bin/phpunit --coverage-clover build/logs/clover.xml
4 changes: 2 additions & 2 deletions src/dist/grumphp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ parameters:
metadata:
priority: 2
clover_coverage:
clover_file: ./coverage.xml
level: 60
clover_file: ./build/logs/clover.xml
level: 70
metadata:
priority: 1
# https://github.com/phpro/grumphp/blob/master/doc/testsuites.md
Expand Down
4 changes: 3 additions & 1 deletion src/dist/phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
</php>

<testsuites>
<testsuite name="Project Test Suite">
<testsuite name="Application">
<directory>tests/</directory>
</testsuite>
</testsuites>
Expand Down Expand Up @@ -48,6 +48,8 @@
<directory>./src/DataFixtures</directory>
<directory>./src/Entities</directory>
<directory>./src/Kernel.php</directory>
<directory>./src/dist</directory>
<directory>./php_cs.php</directory>
</exclude>
</whitelist>
</filter>
Expand Down

0 comments on commit 8b57a38

Please sign in to comment.