From 01afd6de4f8e9475656eafdcb5c69aa7611ec038 Mon Sep 17 00:00:00 2001 From: Nahuel Espinosa Date: Wed, 8 May 2024 23:04:11 -0300 Subject: [PATCH] Allow coverage to drop by 1% (#353) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ### Proposed changes As the title says, this reduces the amount of false positives in detecting test coverage regressions. #### Type of change - [x] 🐛 Bugfix (change which fixes an issue) - [ ] 🚀 Feature (change which adds functionality) - [ ] 📚 Documentation (change which fixes or extends documentation) ### Checklist - [x] Lint and unit tests (if any) pass locally with my changes - [x] I have added tests that prove my fix is effective or that my feature works - [x] I have added necessary documentation (if appropriate) - [x] All commits have been signed for [DCO](https://developercertificate.org/) --------- Signed-off-by: Nahuel Espinosa --- .codecov.yml | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/.codecov.yml b/.codecov.yml index 6125668e0..bd7e39a2f 100644 --- a/.codecov.yml +++ b/.codecov.yml @@ -11,13 +11,21 @@ component_management: default_rules: statuses: - type: project # Measure overall project coverage. - # The minimum coverage ratio to send a success status is the base - # commit coverage (pull request base or parent commit). - target: auto + # The minimum coverage ratio to send a success status. + target: 95% # If the patch coverage is 100% and there are no unexpected changes, # pass the project status. removed_code_behavior: fully_covered_patch + - type: patch # Measure lines adjusted in the pull request. + # The minimum coverage ratio to send a success status is the base + # commit coverage (pull request base or parent commit). + target: auto + # Allow the coverage to drop by this percentage. + threshold: 1% + # Only post patch status to pull requests. + only_pulls: true + individual_components: - component_id: package_beluga name: beluga @@ -33,6 +41,17 @@ component_management: name: beluga_ros paths: - beluga_ros/** + statuses: + # Beluga ROS has its own statutes since it currently has lower coverage. + # See `default_rules` for details. + - type: project + target: 90% + removed_code_behavior: fully_coverred_patch + + - type: patch + target: auto + threshold: 1% + only_pulls: true coverage: # Disable project and patch level coverage status check in favor of