dbt-labs / dbt-core

dbt enables data analysts and engineers to transform their data using the same practices that software engineers use to build applications.
https://getdbt.com
Apache License 2.0
9.25k stars 1.53k forks source link

add a check to make sure unit tests are considered when changing code #10337

Closed ChenyuLInx closed 1 week ago

ChenyuLInx commented 1 week ago

resolves #10329

For new code checked in, we require 75% unittest coverage. We can always adjust if it becomes too noisy. Docs about component https://about.codecov.io/blog/codecov-components-breaking-down-coverage-by-filters/

codecov[bot] commented 1 week ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 88.81%. Comparing base (4415731) to head (e06ed29). Report is 4 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #10337 +/- ## ========================================== + Coverage 88.78% 88.81% +0.02% ========================================== Files 180 180 Lines 22490 22486 -4 ========================================== + Hits 19967 19970 +3 + Misses 2523 2516 -7 ``` | [Flag](https://app.codecov.io/gh/dbt-labs/dbt-core/pull/10337/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dbt-labs) | Coverage Δ | | |---|---|---| | [integration](https://app.codecov.io/gh/dbt-labs/dbt-core/pull/10337/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dbt-labs) | `86.13% <ø> (+0.09%)` | :arrow_up: | | [unit](https://app.codecov.io/gh/dbt-labs/dbt-core/pull/10337/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dbt-labs) | `62.19% <ø> (-0.01%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dbt-labs#carryforward-flags-in-the-pull-request-comment) to find out more. | [Components](https://app.codecov.io/gh/dbt-labs/dbt-core/pull/10337/components?src=pr&el=components&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dbt-labs) | Coverage Δ | | |---|---|---| | [Unit Tests](https://app.codecov.io/gh/dbt-labs/dbt-core/pull/10337/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dbt-labs) | `62.19% <ø> (-0.01%)` | :arrow_down: | | [Integration Tests](https://app.codecov.io/gh/dbt-labs/dbt-core/pull/10337/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dbt-labs) | `86.13% <ø> (+0.09%)` | :arrow_up: |