d0x2f / clover-merge
Merge two or more clover XML files.
Installs: 83 145
Dependents: 1
Suggesters: 0
Security: 0
Stars: 8
Watchers: 3
Forks: 7
Open Issues: 1
Type:project
Requires
- php-ds/php-ds: ^1.2
- vanilla/garden-cli: ^2.1
Requires (Dev)
- kahlan/kahlan: ^4.2
- phan/phan: ^1.0
- php-coveralls/php-coveralls: ^2.1
- sebastianfeldmann/captainhook: ^2.1
- squizlabs/php_codesniffer: ^3.3
Suggests
- ext-ds: to improve performance and reduce memory usage
README
PHP utility to merge two or more clover files into a single document.
Intended to be used in a build pipeline to merge clover output from multiple testing frameworks.
I spent a weekend writing this so you don't have to.
Standalone
Install
Requires composer.
$ git clone https://github.com/d0x2f/CloverMerge.git $ composer install
Run
$ ./clover-merge -o combined.xml input1.xml input2.xml Files Discovered: 332 Final Coverage: 14534/14558 (99.84%)
As a Composer Dependency
Install
In your project root directory:
$ composer require d0x2f/clover-merge
Run
$ ./vendor/bin/clover-merge -o combined.xml input1.xml input2.xml Files Discovered: 332 Final Coverage: 14534/14558 (99.84%)
As a Docker Image
Install
$ docker pull d0x2f/clover-merge
Run
$ docker run --rm -v $(pwd):/build clover-merge -o /build/combined.xml /build/input1.xml /build/input2.xml
Files Discovered: 332
Final Coverage: 14534/14558 (99.84%)
Usage
usage: clover-merge [<options>] [<args>]
OPTIONS
--enforce, -e Exit with failure if final coverage is below the given
threshold
--help, -? Display this help.
--mode, -m merge mode: additive, exclusive or inclusive (default)
--output, -o output file path
ARGUMENTS
paths input file paths
Modes
- Additive - Lines must be present in the first input file for them to be included.
- Exclusive - Lines must be present in all input files for them to be included.
- Inclusive - Lines from all files are included.