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

#602 - Add GitHub action for code-coverage check #603

Merged

Conversation

miroslavpojer
Copy link
Contributor

@miroslavpojer miroslavpojer commented Apr 14, 2023

  • Update of plugins file to support current Absa-JaCoCo workaround.
  • New yml file for server side check.

Closes #602

- Update of plugins file to support current Absa-JaCoCo workaround.
- New yml file for server side check.
@miroslavpojer miroslavpojer self-assigned this Apr 14, 2023
- Fix runtime problems.
- Update Absa sbt-jacoco plugin.
- Add paths to modules to reach jacoco xml files.
- Fix of yml file.
- Remove path to xml file with empty jacoco output.
@github-actions
Copy link

JaCoCo code coverage report - scala 2.12.17 - spark 3.2.3

There is no coverage information present for the Files changed

Total Project Coverage 73.81% 🍏

@github-actions
Copy link

JaCoCo code coverage report - scala 2.11.12 - spark 2.4.8

There is no coverage information present for the Files changed

Total Project Coverage 70.86% 🍏

@github-actions
Copy link

JaCoCo code coverage report - scala 2.13.10 - spark 3.3.2

There is no coverage information present for the Files changed

Total Project Coverage 65.96% 🍏

@miroslavpojer miroslavpojer marked this pull request as ready for review April 19, 2023 16:16
@miroslavpojer miroslavpojer requested a review from yruslan as a code owner April 19, 2023 16:16
- Removed old version of plugin.
Copy link
Collaborator

@yruslan yruslan left a comment

Choose a reason for hiding this comment

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

This is fantastic! I'm looking forward to using it.

Just a couple of questions from me before the merge.

.github/workflows/jacoco_check.yml Show resolved Hide resolved
Comment on lines +62 to +63
min-coverage-overall: ${{ matrix.overall }}
min-coverage-changed-files: ${{ matrix.changed }}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Amazing!

project/plugins.sbt Show resolved Hide resolved
@@ -80,10 +80,12 @@ lazy val cobolConverters = (project in file("cobol-converters"))
// No need to publish this artifact since it has test only at the moment
publishArtifact := false,
publish := {},
publishLocal := {},
publishLocal := {}
).dependsOn(cobolParser)
Copy link
Collaborator

Choose a reason for hiding this comment

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

The parser contains some generated code. Is it possible to exclude

cobol-parser/src/main/scala/za/co/absa/cobrix/cobol/parser/antlr/*.java

from coverage checks (for both overall and changed files) ?

Copy link
Contributor Author

@miroslavpojer miroslavpojer Apr 20, 2023

Choose a reason for hiding this comment

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

*.java files should be excluded already. Current target of code-coverage are *.scala files.
But yes, there is possible to define excludes. See code in build.sbt for prepared example:

lazy val commonJacocoExcludes: Seq[String] = Seq( // "za.co.absa.cobrix.spark.cobol.reader.FixedLenTextReader*", // class and related objects // "za.co.absa.cobrix.spark.cobol.reader.RowHandler" // class only )

@yruslan
Copy link
Collaborator

yruslan commented Apr 20, 2023

Once this is merged, we can try it out on #609 , so I'll hold merging #609 for now

Copy link
Collaborator

@yruslan yruslan left a comment

Choose a reason for hiding this comment

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

Great, thanks a lot! Looking forward to monitoring the coverage

@miroslavpojer miroslavpojer merged commit fb61b66 into master Apr 20, 2023
@miroslavpojer miroslavpojer deleted the feature/add_github_action_for_code_coverage_check branch April 20, 2023 07:30
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.

Add GitHub action for code-coverage check
2 participants