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 test coverage github action #151

Merged
merged 7 commits into from
Mar 23, 2022
Merged

Add test coverage github action #151

merged 7 commits into from
Mar 23, 2022

Conversation

fridgepoet
Copy link
Member

@fridgepoet fridgepoet commented Mar 23, 2022

This github action does the following for pull requests:

  • Checks out this PR's code
  • Checks out code on main
  • Calculates test coverage for each
  • Leaves a comment on the PR with a test coverage report with the difference between PR coverage vs main coverage
  • When commits are added to the PR, the existing comment should be updated with an up-to-date coverage report.

To do:

  • Backend coverage
  • Add frontend coverage
  • Migrate this action to another repo so it can be referenced from other repos

I was very much inspired by the guidelines defined by the Loki team but didn't use drone reports as was done in the proposed solution...

Contributes to https://github.com/grafana/cloud-data-sources/issues/5

@github-actions
Copy link

github-actions bot commented Mar 23, 2022

Code coverage report for PR #151

Go Typescript
main 64.4% 47.49%
PR 64.4% 47.49%
difference 0% 0%

Copy link
Contributor

@andresmgot andresmgot left a comment

Choose a reason for hiding this comment

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

Great! Looking good so far :)

.github/workflows/code_coverage.yml Outdated Show resolved Hide resolved
.github/workflows/code_coverage.yml Outdated Show resolved Hide resolved
@fridgepoet fridgepoet marked this pull request as ready for review March 23, 2022 13:17
@fridgepoet fridgepoet requested a review from a team as a code owner March 23, 2022 13:17
@fridgepoet fridgepoet requested review from sunker and sarahzinger and removed request for a team March 23, 2022 13:17
Copy link
Contributor

@andresmgot andresmgot left a comment

Choose a reason for hiding this comment

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

LGTM! Do you plan to merge this before moving this to a separate package?

.github/workflows/code_coverage.yml Outdated Show resolved Hide resolved
.github/workflows/code_coverage.yml Outdated Show resolved Hide resolved
@fridgepoet
Copy link
Member Author

Thanks! Once I've put the final touches, I think we can merge it as-is so that it can start seeing some action (::crickets::) and I'll move it separately afterwards.

@fridgepoet fridgepoet merged commit 8446894 into main Mar 23, 2022
@fridgepoet fridgepoet deleted the code-coverage-action branch March 23, 2022 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants