Repository navigation
Add coverage-check and print-section scripts - #42
Merged
Merged
Conversation
Introduce two executables, both shipped to the consumer's vendor/bin:
- bin/coverage-check
- Reads a Cobertura XML report, compares its line coverage against a
minimum percentage and exits non-zero when it falls below it.
- bin/print-section
- Prints a centered section header, so the output of the individual
tools in a multi-step script stays easy to tell apart.
Wire both into composer.json:
- PHPUnit now also writes a Cobertura report next to the existing ones.
- The ci script prints a header before each step and ends with a new
coverage-check script pinned at 95%.
- ext-simplexml is declared, as coverage-check parses the report with it.
- psalm.xml.dist ignores bin/, and composer-dependency-analyser.php
ignores the unused-dependency report for ext-simplexml.
Document both tools under docs/, one folder per tool, and index them
from README.md, CONTRIBUTING.md and AGENTS.md.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
hugo-goncalves-kununu
marked this pull request as ready for review
September 15, 2026 08:50
danielsantos-kununu
approved these changes
Sep 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The objective of this PR is to add two helper executables to the package,
coverage-checkandprint-section, and to use both in this repository's ownciscript.Both are shipped through the
binentry incomposer.json, so consuming projects get them invendor/binalongsidecode-toolsandphp-in-k8s.Details
bin/coverage-checklines-coveredoverlines-valid) against a minimum percentage.STDERRwith exit code 1.bin/print-sectionNO_COLORconvention.composer.jsontest-coveragenow also writes a Cobertura report, next to the existing Clover, JUnit and HTML ones.coverage-checkscript, pinned at the 95% minimum thatCONTRIBUTING.mdalready asks for.ciprints a header before each of its steps and ends with the coverage check.ext-simplexmlis declared, sincecoverage-checkparses the report with it.psalm.xml.distandcomposer-dependency-analyser.phpbin/, and the dependency analyser ignores the unused-dependency report forext-simplexml, which is only used frombin/.docs/CoverageCheck/anddocs/PrintSection/pages, one folder per tool, following the rest ofdocs/.README.md, and referenced fromCONTRIBUTING.mdandAGENTS.md.