add coveralls integration

This commit is contained in:
azjezz 2019-12-25 19:39:01 +01:00
parent f9b3017591
commit 08bdf51436
6 changed files with 26 additions and 4 deletions

3
.coveralls.yml Normal file
View File

@ -0,0 +1,3 @@
coverage_clover: tests/logs/clover.xml
json_path: tests/logs/coveralls-upload.json
service_name: travis-ci

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
/vendor/
.composer.lock
.php_cs.cache
.phpunit.result.cache

View File

@ -13,9 +13,15 @@ jobs:
- php: nightly
install:
- composer self-update
- composer --version
- php -v
- composer install
script:
- php vendor/bin/php-cs-fixer fix --dry-run -vvv
- php vendor/bin/psalm
- php vendor/bin/phpunit
after_script:
- composer coveralls

View File

@ -1,9 +1,15 @@
# Psl - PHP Standard Library
Psl is a standard library for PHP, inspired by [hhvm/hsl](https://github.com/hhvm/hsl).
The goal of Psl is to provide a consistent, centralized, well-typed set of APIs for PHP programmers.
[![Build Status](https://travis-ci.org/azjezz/psl.svg?branch=master)](https://travis-ci.org/azjezz/psl)
[![Total Downloads](https://poser.pugx.org/azjezz/psl/d/total.svg)](https://packagist.org/packages/azjezz/psl)
[![Latest Stable Version](https://poser.pugx.org/azjezz/psl/v/stable.svg)](https://packagist.org/packages/azjezz/psl)
[![License](https://poser.pugx.org/azjezz/psl/license.svg)](https://packagist.org/packages/azjezz/psl)
## Example
```php
<?php

View File

@ -16,7 +16,8 @@
"require-dev": {
"vimeo/psalm": "dev-master",
"phpunit/phpunit": "^8.5",
"friendsofphp/php-cs-fixer": "^2.16"
"friendsofphp/php-cs-fixer": "^2.16",
"php-coveralls/php-coveralls": "^2.2"
},
"autoload": {
"psr-4": {
@ -29,6 +30,7 @@
"scripts": {
"type-check": "psalm",
"test": "phpunit",
"cs-fix": "php-cs-fixer fix"
"cs-fix": "php-cs-fixer fix",
"coveralls": "php-coveralls -v"
}
}

View File

@ -3,8 +3,8 @@
<!-- https://phpunit.de/manual/current/en/appendixes.configuration.html -->
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/8.5/phpunit.xsd"
backupGlobals="false"
colors="true"
stopOnFailure="true"
bootstrap="vendor/autoload.php"
>
<php>
@ -21,8 +21,12 @@
</testsuite>
</testsuites>
<logging>
<log type="coverage-clover" target="build/logs/clover.xml"/>
</logging>
<filter>
<whitelist>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory>src</directory>
</whitelist>
</filter>