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/ /vendor/
.composer.lock
.php_cs.cache .php_cs.cache
.phpunit.result.cache .phpunit.result.cache

View File

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

View File

@ -1,9 +1,15 @@
# Psl - PHP Standard Library # Psl - PHP Standard Library
Psl is a standard library for PHP, inspired by [hhvm/hsl](https://github.com/hhvm/hsl). 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. 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 ## Example
```php ```php
<?php <?php

View File

@ -16,7 +16,8 @@
"require-dev": { "require-dev": {
"vimeo/psalm": "dev-master", "vimeo/psalm": "dev-master",
"phpunit/phpunit": "^8.5", "phpunit/phpunit": "^8.5",
"friendsofphp/php-cs-fixer": "^2.16" "friendsofphp/php-cs-fixer": "^2.16",
"php-coveralls/php-coveralls": "^2.2"
}, },
"autoload": { "autoload": {
"psr-4": { "psr-4": {
@ -29,6 +30,7 @@
"scripts": { "scripts": {
"type-check": "psalm", "type-check": "psalm",
"test": "phpunit", "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 --> <!-- https://phpunit.de/manual/current/en/appendixes.configuration.html -->
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/8.5/phpunit.xsd" xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/8.5/phpunit.xsd"
backupGlobals="false"
colors="true" colors="true"
stopOnFailure="true"
bootstrap="vendor/autoload.php" bootstrap="vendor/autoload.php"
> >
<php> <php>
@ -21,8 +21,12 @@
</testsuite> </testsuite>
</testsuites> </testsuites>
<logging>
<log type="coverage-clover" target="build/logs/clover.xml"/>
</logging>
<filter> <filter>
<whitelist> <whitelist processUncoveredFilesFromWhitelist="true">
<directory>src</directory> <directory>src</directory>
</whitelist> </whitelist>
</filter> </filter>