Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,10 @@ jobs:
extensions: zlib
coverage: xdebug
- run: composer install
- run: vendor/bin/phpunit --coverage-text ${{ matrix.php < 7.3 && '-c phpunit.xml.legacy' || '' }}
- run: vendor/bin/phpunit --coverage-text --coverage-clover clover.xml ${{ matrix.php < 7.3 && '-c phpunit.xml.legacy' || '' }}
- name: Check 100% code coverage
shell: php {0}
run: |
<?php
$metrics = simplexml_load_file('clover.xml')->project->metrics;
exit((int) $metrics['statements'] === (int) $metrics['coveredstatements'] ? 0 : 1);
Comment thread
clue marked this conversation as resolved.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# clue/reactphp-zlib

[![CI status](https://github.com/clue/reactphp-zlib/actions/workflows/ci.yml/badge.svg)](https://github.com/clue/reactphp-zlib/actions)
[![code coverage](https://img.shields.io/badge/code%20coverage-100%25-success)](#tests)
Comment thread
clue marked this conversation as resolved.
[![installs on Packagist](https://img.shields.io/packagist/dt/clue/zlib-react?color=blue&label=installs%20on%20Packagist)](https://packagist.org/packages/clue/zlib-react)

Streaming zlib compressor and decompressor for [ReactPHP](https://reactphp.org/),
Expand Down Expand Up @@ -221,6 +222,14 @@ To run the test suite, go to the project root and run:
vendor/bin/phpunit
```

The test suite is set up to always ensure 100% code coverage across all
supported environments. If you have the Xdebug extension installed, you can also
generate a code coverage report locally like this:

Comment thread
clue marked this conversation as resolved.
```bash
XDEBUG_MODE=coverage vendor/bin/phpunit --coverage-text
```

## License

This project is released under the permissive [MIT license](LICENSE).
Expand Down