File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 26
26
coverage : xdebug
27
27
- run : composer install
28
28
- run : docker run --net=host -d redis
29
- - run : REDIS_URI=localhost:6379 vendor/bin/phpunit --coverage-text
29
+ - run : REDIS_URI=localhost:6379 vendor/bin/phpunit --coverage-text --coverage-clover=clover.xml
30
30
if : ${{ matrix.php >= 7.3 }}
31
- - run : REDIS_URI=localhost:6379 vendor/bin/phpunit --coverage-text -c phpunit.xml.legacy
31
+ - run : REDIS_URI=localhost:6379 vendor/bin/phpunit --coverage-text --coverage-clover=clover.xml - c phpunit.xml.legacy
32
32
if : ${{ matrix.php < 7.3 }}
33
+ - name : Check 100% code coverage
34
+ shell : php {0}
35
+ run : |
36
+ <?php
37
+ $metrics = simplexml_load_file('clover.xml')->project->metrics;
38
+ exit((int) $metrics['statements'] === (int) $metrics['coveredstatements'] ? 0 : 1);
You can’t perform that action at this time.
0 commit comments