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

Add code coverage GitHub Action #943

Merged
merged 1 commit into from
Oct 11, 2022

Conversation

AObuchow
Copy link
Collaborator

@AObuchow AObuchow commented Oct 4, 2022

What does this PR do?

Enables the creation of code coverage reports for the repository.
A new CI action will run for PR's and for pushes to the main branch. The latter is required to have coverage reports which PR coverage reports can be compared against.

I've disabled the annotations which point out which lines of code are not tested, as I personally find them to make PR's harder to read.

I also added the codecov badge to the README.

One thing to note: the codecov GH app must be enabled. I sent a request for this yesterday and saw today that it seems to be enabled. So there shouldn't be any issue there.

What issues does this PR fix or reference?

#929

Is it tested? How?

Testing is a bit tricky as this GH actions can only really be tested after they are merged.
Edit: Apparently, the code coverage action is running in this PR.. though it is likely to not work correctly as the main branch does not have a code coverage report uploaded to codecov.io yet.

I did test out the action on my own fork of the repo, and it seems to be working as expected.

I did not however test that the badge is working as expected, this will have to be verified after this PR is merged.

PR Checklist

  • E2E tests pass (when PR is ready, comment /test v8-devworkspace-operator-e2e, v8-che-happy-path to trigger)
    • v8-devworkspace-operator-e2e: DevWorkspace e2e test
    • v8-che-happy-path: Happy path for verification integration with Che

@AObuchow AObuchow linked an issue Oct 4, 2022 that may be closed by this pull request
@AObuchow
Copy link
Collaborator Author

AObuchow commented Oct 5, 2022

/retest

@codecov
Copy link

codecov bot commented Oct 5, 2022

Codecov Report

❗ No coverage uploaded for pull request base (main@c24f04e). Click here to learn what that means.
Patch has no changes to coverable lines.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #943   +/-   ##
=======================================
  Coverage        ?   48.50%           
=======================================
  Files           ?       36           
  Lines           ?     2307           
  Branches        ?        0           
=======================================
  Hits            ?     1119           
  Misses          ?     1076           
  Partials        ?      112           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Collaborator

@amisevsk amisevsk left a comment

Choose a reason for hiding this comment

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

Looks fine to me 👍

codecov.yml Outdated
@@ -0,0 +1,2 @@
github_checks:
annotations: false
Copy link
Collaborator

Choose a reason for hiding this comment

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

Trailing newline

@AObuchow AObuchow force-pushed the add_code_coverage_action_final branch from e71caf6 to c08e67c Compare October 7, 2022 20:47
@openshift-ci openshift-ci bot removed the lgtm label Oct 7, 2022
@openshift-ci openshift-ci bot added the lgtm label Oct 11, 2022
@ibuziuk ibuziuk merged commit 96f534e into devfile:main Oct 11, 2022
@openshift-ci
Copy link

openshift-ci bot commented Oct 11, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: amisevsk, AObuchow, ibuziuk

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

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.

Add code coverage GitHub action
3 participants