feat(ci): Enforce 90% code coverage gate across all platforms in pre-submits#1968
Draft
gspencergoog wants to merge 7 commits into
Draft
feat(ci): Enforce 90% code coverage gate across all platforms in pre-submits#1968gspencergoog wants to merge 7 commits into
gspencergoog wants to merge 7 commits into
Conversation
Collaborator
|
Hmm, this is not a great metric :/ |
- Python: Added unit tests for strategies and scorers (90.01% overall). - Swift: Expanded JSONValue decoding tests (100.00% overall). - Flutter: Added unit and widget tests for restaurant_finder app (94.87% overall).
Collaborator
Author
I agree that it's not the only metric, and that it wouldn't be great to ask for 100% coverage, but a reasonable coverage metric forces agents and developers to make sure that tests are written for newly added code. It's not perfect, but I'm all ears if you have suggestions for how to enforce this otherwise. A better gate would enforce that there's 90% coverage of useful tests, but that's a more expensive check, and I'm planning on making a weekly check for that kind of thing. |
…t_coverage_test lints
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.
This pull request enforces a 90% unit test coverage gate across all platforms (Python, TypeScript, Dart/Flutter, and Swift) in continuous integration pre-submits.
Changes
renderers/web_core/scripts/check_coverage.js(TypeScript/Node)scripts/check_dart_coverage.dart(Dart/Flutter)scripts/check_swift_coverage.py(Swift)python_ci.yml,flutter_packages_test.yaml,swift_build_and_test.yml).pytest-covand wireit test commands to execute the threshold gates.eval/tests/) raising Python coverage to 90.01%.swift/core/JSONSchema/Tests/JSONValueTests.swift) raising Swift coverage to 100.00%.restaurant_finderapp (samples/client/flutter/restaurant_finder/app/test/) raising Flutter coverage to 94.87%.