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

Added simple coverage report #9

Merged
merged 21 commits into from Mar 30, 2022
Merged

Added simple coverage report #9

merged 21 commits into from Mar 30, 2022

Conversation

AntoniosBarotsis
Copy link
Collaborator

@AntoniosBarotsis AntoniosBarotsis commented Mar 26, 2022

codecov

Main Changes

Added a simple coverage report that shows you how many times each Expr case class is used in the tests.

image

The output currently looks ugly, in the future I'll look into the possibility of using CodeCov.

Edit

Turns out adding CodeCov was a lot less complicated than what I was expecting so I did that.

The coverage is no longer printed in the console as shown in the picture earlier (although it is easy to add it back if that is wanted, see here).

The Coverage class now also associates the covered classes with their respective lines in the Definitions.scala file meaning you can now get clean detailed views. Currently, "low" coverages won't fail a pipeline but that along with other stuff like what is considered "low" coverage can be changed from the codecov.yml file.

The coverage report is a bit weird now because the base (source repo) does not have any reports yet but that should fix itself post-merge. Link to the CodeCov report.

Also epic badge [![codecov](https://codecov.io/gh/pijuskri/Po-Sharp/branch/dev/graph/badge.svg)](https://codecov.io/gh/pijuskri/Po-Sharp/).

Other

As noted in the documentation, any Expr case class can be omitted from the coverage results if it is considered unimportant.

The pull request also includes:

  • some refactorings
  • small improvements in error messages
  • a bug fix that would cause some tests to randomly fail.

@AntoniosBarotsis AntoniosBarotsis changed the title Added simple coverage report WI: Added simple coverage report Mar 26, 2022
@AntoniosBarotsis AntoniosBarotsis changed the title WI: Added simple coverage report WIP: Added simple coverage report Mar 26, 2022
@AntoniosBarotsis AntoniosBarotsis changed the title WIP: Added simple coverage report WIP:Added simple coverage report Mar 26, 2022
@AntoniosBarotsis AntoniosBarotsis changed the title WIP:Added simple coverage report Added simple coverage report Mar 26, 2022
@AntoniosBarotsis AntoniosBarotsis marked this pull request as draft March 26, 2022 01:55
@AntoniosBarotsis
Copy link
Collaborator Author

Pipeline consistently fails with Compilation failed with scala.Parser$ParseException: parsing fail which I cannot seem to replicate locally, will have to look into that.

@AntoniosBarotsis
Copy link
Collaborator Author

The issue was that my branch had an outdated Exception definition. That was fine locally but the pipeline used the remote definition since that would be the end result of the merge and thus kept failing.

Moral of the story; always merge the remote branch to your branch before making a pull request.

@AntoniosBarotsis AntoniosBarotsis marked this pull request as ready for review March 26, 2022 15:53
@codecov-commenter
Copy link

Codecov Report

❗ No coverage uploaded for pull request base (dev@fd215bb). Click here to learn what that means.
The diff coverage is n/a.

@@          Coverage Diff           @@
##             dev       #9   +/-   ##
======================================
  Coverage       ?   66.66%           
======================================
  Files          ?        1           
  Lines          ?       45           
  Branches       ?        0           
======================================
  Hits           ?       30           
  Misses         ?       15           
  Partials       ?        0           

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 fd215bb...d0efa44. Read the comment docs.

@pijuskri pijuskri merged commit 3dc6b03 into pijuskri:dev Mar 30, 2022
@pijuskri
Copy link
Owner

gamer

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

3 participants