Repository navigation
Add quality gates: Rector and minimum coverage - #49
Merged
Merged
Conversation
…ck, and CI fails when line coverage drops below 100%, with matching Codecov targets.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #49 +/- ##
===========================================
Coverage 100.00% 100.00%
+ Complexity 161 159 -2
===========================================
Files 16 16
Lines 370 370
===========================================
Hits 370 370 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Adds two quality gates to CI: a Rector dry run, and a minimum line coverage of 100%.
Rector
rector.phpcoverssrcandtests. The rule sets are:composer.json's^8.3maincomposer check, through the newcomposer rectorscript;composer rector:fixapplies the changespublic const string VERSION)final readonly classfor classes whose properties were all readonly:BitGo,Paginatorand the resource classesin_array()inPath::check()@paramtags that repeated the signature with no description were removedLocallyCalledStaticMethodToNonStaticRector, because the pure helpers inHttpandRetryPolicystay static on purposeRecastingRemovalRectorinRetryPolicy. The(int)inbackoffMs()matters:2 ** nbecomes a float once it overflows, andrandom_int()needs an int.Coverage
coverage.xmland fails belowMIN_COVERAGE(100). That job is already required, so the gate blocks a merge with no ruleset change.codecov.ymlsets the project and patch targets to 100%, so the Codecov checks agree with CI. They aren't required checks; the CI step is what blocks a merge.Checked
::error::annotation, when coverage is low.composer check: passes, with 182 tests and coverage at 100%.Also
.gitattributeskeepsrector.phpandcodecov.ymlout of dist archives.