Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enforces equal or increasing code coverage in PRs #1559

Merged
merged 1 commit into from
May 17, 2022

Conversation

tmarkley
Copy link
Contributor

@tmarkley tmarkley commented May 6, 2022

Description

The purpose of enforcing increasing code coverage over time is to attempt to improve the quality of changes via testing, reduce the need to request tests in PRs, and stay away from enforcing an ambiguous coverage percentage.

Validated the config:

$ curl -X POST --data-binary @.github/.codecov.yml https://codecov.io/validate
Valid!

{
  "coverage": {
    "status": {
      "project": {
        "default": {
          "target": "auto"
        }
      }
    }
  }
}

Issues Resolved

N/A

Check List

  • Commits are signed per the DCO using --signoff

* Utilizes Codecov yaml configuration: https://docs.codecov.com/docs/codecov-yaml

Signed-off-by: Tommy Markley <[email protected]>
@tmarkley tmarkley requested a review from a team as a code owner May 6, 2022 16:58
@codecov-commenter
Copy link

Codecov Report

Merging #1559 (6a2cb50) into main (cba0764) will increase coverage by 0.00%.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main    #1559   +/-   ##
=======================================
  Coverage   68.09%   68.09%           
=======================================
  Files        3072     3072           
  Lines       59032    59032           
  Branches     8928     8928           
=======================================
+ Hits        40198    40200    +2     
+ Misses      16647    16646    -1     
+ Partials     2187     2186    -1     
Impacted Files Coverage Δ
...ic/application/models/sense_editor/sense_editor.ts 64.88% <0.00%> (+0.88%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cba0764...6a2cb50. Read the comment docs.

@CPTNB
Copy link
Contributor

CPTNB commented May 9, 2022

Do we have a testing doctrine or testing goals or metric targets?

@tmarkley
Copy link
Contributor Author

tmarkley commented May 9, 2022

Do we have a testing doctrine or testing goals or metric targets?

@CPTNB I think our TESTING.md doc covers some of that. We don't currently have a metric goal for tests; I've seen other repositories in the OpenSearch Project target between 70% and 80%, but I'm hesitant to add a target at this point since we have a lot of issues related to testing that we want to address:

https://github.com/opensearch-project/OpenSearch-Dashboards/issues?q=is%3Aopen+is%3Aissue+label%3Atest%3Aunit%2Ctest%3Aintegration%2Ctest%3Afunctional

@ashwin-pc
Copy link
Member

Can we still override it if necessary? Like when we merge the mocha test removal PR or if the diff is minor like -.01%. Some readme update PR's usually have that as the coverage diff

@tmarkley
Copy link
Contributor Author

Can we still override it if necessary? Like when we merge the mocha test removal PR or if the diff is minor like -.01%. Some readme update PR's usually have that as the coverage diff

@ashwin-pc yes, similar to how we can still merge if one of the Build and test checks fail (e.g. a flaky test fails or the version of chromedriver doesn't match GitHub), we maintainers can still choose to merge if the Codecov check fails and there are two approvers.

@tmarkley tmarkley merged commit 21d7b6f into opensearch-project:main May 17, 2022
@tmarkley tmarkley deleted the codecov_config branch May 17, 2022 18:39
opensearch-trigger-bot bot pushed a commit that referenced this pull request May 17, 2022
* Utilizes Codecov yaml configuration: https://docs.codecov.com/docs/codecov-yaml
* The purpose of enforcing increasing code coverage over time is to attempt to improve the quality of
  changes via testing, reduce the need to request tests in PRs, and stay away from enforcing an
  ambiguous coverage percentage.

Signed-off-by: Tommy Markley <[email protected]>
(cherry picked from commit 21d7b6f)
opensearch-trigger-bot bot pushed a commit that referenced this pull request May 17, 2022
* Utilizes Codecov yaml configuration: https://docs.codecov.com/docs/codecov-yaml
* The purpose of enforcing increasing code coverage over time is to attempt to improve the quality of
  changes via testing, reduce the need to request tests in PRs, and stay away from enforcing an
  ambiguous coverage percentage.

Signed-off-by: Tommy Markley <[email protected]>
(cherry picked from commit 21d7b6f)
opensearch-trigger-bot bot pushed a commit that referenced this pull request May 17, 2022
* Utilizes Codecov yaml configuration: https://docs.codecov.com/docs/codecov-yaml
* The purpose of enforcing increasing code coverage over time is to attempt to improve the quality of
  changes via testing, reduce the need to request tests in PRs, and stay away from enforcing an
  ambiguous coverage percentage.

Signed-off-by: Tommy Markley <[email protected]>
(cherry picked from commit 21d7b6f)
opensearch-trigger-bot bot pushed a commit that referenced this pull request May 17, 2022
* Utilizes Codecov yaml configuration: https://docs.codecov.com/docs/codecov-yaml
* The purpose of enforcing increasing code coverage over time is to attempt to improve the quality of
  changes via testing, reduce the need to request tests in PRs, and stay away from enforcing an
  ambiguous coverage percentage.

Signed-off-by: Tommy Markley <[email protected]>
(cherry picked from commit 21d7b6f)
tmarkley pushed a commit that referenced this pull request May 18, 2022
…#1590)

* Utilizes Codecov yaml configuration: https://docs.codecov.com/docs/codecov-yaml
* The purpose of enforcing increasing code coverage over time is to attempt to improve the quality of
  changes via testing, reduce the need to request tests in PRs, and stay away from enforcing an
  ambiguous coverage percentage.

Signed-off-by: Tommy Markley <[email protected]>
(cherry picked from commit 21d7b6f)
tmarkley pushed a commit that referenced this pull request May 19, 2022
…#1591)

* Utilizes Codecov yaml configuration: https://docs.codecov.com/docs/codecov-yaml
* The purpose of enforcing increasing code coverage over time is to attempt to improve the quality of
  changes via testing, reduce the need to request tests in PRs, and stay away from enforcing an
  ambiguous coverage percentage.

Signed-off-by: Tommy Markley <[email protected]>
(cherry picked from commit 21d7b6f)
tmarkley pushed a commit that referenced this pull request May 19, 2022
…#1589)

* Utilizes Codecov yaml configuration: https://docs.codecov.com/docs/codecov-yaml
* The purpose of enforcing increasing code coverage over time is to attempt to improve the quality of
  changes via testing, reduce the need to request tests in PRs, and stay away from enforcing an
  ambiguous coverage percentage.

Signed-off-by: Tommy Markley <[email protected]>
(cherry picked from commit 21d7b6f)
tmarkley pushed a commit that referenced this pull request May 19, 2022
…#1588)

* Utilizes Codecov yaml configuration: https://docs.codecov.com/docs/codecov-yaml
* The purpose of enforcing increasing code coverage over time is to attempt to improve the quality of
  changes via testing, reduce the need to request tests in PRs, and stay away from enforcing an
  ambiguous coverage percentage.

Signed-off-by: Tommy Markley <[email protected]>
(cherry picked from commit 21d7b6f)
kavilla pushed a commit to kavilla/OpenSearch-Dashboards-1 that referenced this pull request Jun 8, 2022
…arch-project#1559)

* Utilizes Codecov yaml configuration: https://docs.codecov.com/docs/codecov-yaml
* The purpose of enforcing increasing code coverage over time is to attempt to improve the quality of 
  changes via testing, reduce the need to request tests in PRs, and stay away from enforcing an 
  ambiguous coverage percentage.

Signed-off-by: Tommy Markley <[email protected]>
kavilla pushed a commit to kavilla/OpenSearch-Dashboards-1 that referenced this pull request Jun 16, 2022
…arch-project#1559)

* Utilizes Codecov yaml configuration: https://docs.codecov.com/docs/codecov-yaml
* The purpose of enforcing increasing code coverage over time is to attempt to improve the quality of 
  changes via testing, reduce the need to request tests in PRs, and stay away from enforcing an 
  ambiguous coverage percentage.

Signed-off-by: Tommy Markley <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants