Repository navigation
test: 100% coverage required in CI, measured badge with the full report (ADR 0015) - #23
Merged
Merged
Conversation
…asured badge - Coverage now also measures scripts/, which decide what reaches PyPI; new tests cover their remaining paths (browser missing, no pinned Mermaid, a diagram with no heading above it, a diagram that swallowed a fence, git). - run_batch reads each result with isinstance, as the rest of application/ does, so a match without a fallback no longer leaves an untestable branch; a non-Result fails loudly instead of being skipped into Ok([]). - fail_under = 100. - docs.yml gets a coverage job that publishes the HTML report under /coverage/ and coverage.json, which the README badge reads through shields.io (ADR 0015). Only its output joins the site artifact. Chose a self-hosted, measured badge over Codecov because it needs no account, token or source upload for the same badge, and over a static badge because a typed number goes stale at the first change. Chose a separate coverage job over running the tests in the build job because the dev tools and tests must not share a machine with the site artifact.
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.
What
scripts/, which are now measured too.fail_under = 100). The number shown cannot slip unnoticed.coveragejob indocs.ymlpublishes the HTML report at https://akinzou.github.io/MetaTrader5-Python/coverage/ and acoverage.jsonthat the badge reads through shields.io. Clicking the badge opens the line-by-line report.run_batchreads results withisinstance, like the rest ofapplication/. A non-Result now fails loudly instead of being skipped intoOk([]); through the public API it was unreachable.Why this badge
Verification
check_file_length.py,mkdocs build --strict.coverage_badge.pywrites{"message": "100%", "color": "brightgreen"}and the HTML report builds.Review
/code-review high, 8 findings.Fixed:
isinstancepattern;git ls-filestest no longer needs a checkout;Not changed:
docs.yml: chosen over coupling the deploy to another workflow's artifacts.