adding support for automatic code coverage generation into codacy
This commit is contained in:
parent
5980f8b603
commit
9267e281f5
|
@ -1,12 +1,14 @@
|
||||||
# Ignore data/ and tmp/
|
# Ignore data/, tmp/ and vendor/
|
||||||
data/
|
data/
|
||||||
tmp/
|
tmp/
|
||||||
|
vendor/
|
||||||
# Ignore for safety
|
# Ignore for safety
|
||||||
.htaccess
|
.htaccess
|
||||||
.htpasswd
|
.htpasswd
|
||||||
# Ignore unit testing logs, api docs and eclipse project files
|
# Ignore unit testing logs, api docs and eclipse project files
|
||||||
tst/log/
|
tst/log/
|
||||||
doc/
|
doc/
|
||||||
|
composer.lock
|
||||||
.settings
|
.settings
|
||||||
.buildpath
|
.buildpath
|
||||||
.project
|
.project
|
||||||
|
|
17
.travis.yml
17
.travis.yml
|
@ -1,8 +1,17 @@
|
||||||
language: php
|
language: php
|
||||||
sudo: false
|
sudo: false
|
||||||
php:
|
php:
|
||||||
- 5.5
|
- 5.5
|
||||||
- 5.6
|
- 5.6
|
||||||
- 7.0
|
- 7.0
|
||||||
|
- hhvm
|
||||||
|
|
||||||
|
before_script:
|
||||||
|
- curl -s http://getcomposer.org/installer | php
|
||||||
|
- php composer.phar install -n
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- cd tst && phpunit
|
- cd tst && phpunit
|
||||||
|
|
||||||
|
after_script:
|
||||||
|
- php vendor/bin/codacycoverage clover tst/log/coverage-clover.xml
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"require-dev": {
|
||||||
|
"codacy/coverage": "dev-master"
|
||||||
|
}
|
||||||
|
}
|
|
@ -9,7 +9,7 @@ and its dependencies:
|
||||||
* php5-xdebug
|
* php5-xdebug
|
||||||
|
|
||||||
Example for Debian and Ubuntu:
|
Example for Debian and Ubuntu:
|
||||||
$ sudo aptitude install phpunit php5-mysql php5-xdebug
|
$ sudo aptitude install phpunit php5-gd php5-sqlite php5-xdebug
|
||||||
|
|
||||||
To run the tests, just change into this directory and run phpunit:
|
To run the tests, just change into this directory and run phpunit:
|
||||||
$ cd ZeroBin/tst
|
$ cd ZeroBin/tst
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
</whitelist>
|
</whitelist>
|
||||||
</filter>
|
</filter>
|
||||||
<logging>
|
<logging>
|
||||||
|
<log type="coverage-clover" target="log/coverage-clover.xml" />
|
||||||
<log type="coverage-html" target="log/coverage-report" charset="UTF-8" yui="true" highlight="true" lowUpperBound="50" highLowerBound="80" />
|
<log type="coverage-html" target="log/coverage-report" charset="UTF-8" yui="true" highlight="true" lowUpperBound="50" highLowerBound="80" />
|
||||||
<log type="testdox-html" target="log/testdox.html" />
|
<log type="testdox-html" target="log/testdox.html" />
|
||||||
</logging>
|
</logging>
|
||||||
|
|
Loading…
Reference in New Issue