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

ci: fix coverage badge wf and omit test files from unit test coverage #783

Merged
merged 2 commits into from
Dec 18, 2024

Conversation

Bobbins228
Copy link
Contributor

@Bobbins228 Bobbins228 commented Dec 18, 2024

Issue link

What changes have been made

Verification steps

Run coverage run --omit="src/**/test_*.py,src/codeflare_sdk/common/utils/unit_test_support.py" -m pytest and verify the unit test files are not included when you run coverage report

Checks

  • I've made sure the tests are passing.
  • Testing Strategy
    • Unit tests
    • Manual tests
    • Testing is not required for this change

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Dec 18, 2024
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Dec 18, 2024
Copy link
Contributor

@Ygnas Ygnas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified works as expected.

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Dec 18, 2024
Copy link
Contributor

@varshaprasad96 varshaprasad96 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve

Copy link
Contributor

openshift-ci bot commented Dec 18, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: varshaprasad96, Ygnas

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 18, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit c8e77fc into project-codeflare:main Dec 18, 2024
13 checks passed
@akram
Copy link
Contributor

akram commented Dec 18, 2024

thanks @Bobbins228 , this is somehting I have noticed while trying to push my PR; and it was biasing the coverage results.
Having now the rule global will make things better.
Also, we could have a .coveragerc file that has this to make tests also run the same way locally.

@Bobbins228
Copy link
Contributor Author

A .coveragerc file could be good! Would help rather than having to make sure 2 workflows and documentation are kept updated. I will look into this thanks Akram 👍

@akram
Copy link
Contributor

akram commented Dec 18, 2024

here is the .coveragerc that I use:

[run]
omit =
    src/**/test_*.py,src/codeflare_sdk/common/utils/unit_test_support.py

[report]
exclude_lines =
    pragma: no cover

and since I put it, unit tests appears in vscode now

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants