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 Codecov configuration #22

Merged
merged 1 commit into from
Mar 7, 2024
Merged

Add Codecov configuration #22

merged 1 commit into from
Mar 7, 2024

Conversation

twyatt
Copy link
Member

@twyatt twyatt commented Mar 7, 2024

Fixes Codecov coverage reporting by configuring path fixes (which are needed because Codecov doesn't natively understand Kotlin source organization).

The path fix re-writes the path at which Codecov will look for source files, whereas when looking for class com.juul.kronicle.Example Codecov would traditionally look for that class file in com/juul/kronicle (as that is convention for Java). Since Kotlin can have a flatter source code organization (whereas the empty initial package directories can be omitted), we have to instruct Codecov accordingly.

Codecov path fixes are structured as <files in coverage report>::<corresponding paths in project>; the fix added in this PR (com/juul/khronicle::) doesn't have a path on the right side of the ::, meaning that we are basically dropping the package directories that Kotlin doesn't require. For example, if we had a class in package com.juul.khronicle.example then the path fix would cause Codecov to look for the source file in example/.

@twyatt twyatt added the maintenance General maintenance that doesn't effect the public API. label Mar 7, 2024
Copy link

codecov bot commented Mar 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.38%. Comparing base (dd278bd) to head (5d20f3d).

Additional details and impacted files
@@             Coverage Diff             @@
##             main      #22       +/-   ##
===========================================
+ Coverage        0   94.38%   +94.38%     
- Complexity      0      120      +120     
===========================================
  Files           0       14       +14     
  Lines           0      178      +178     
  Branches        0       14       +14     
===========================================
+ Hits            0      168      +168     
- Misses          0        6        +6     
- Partials        0        4        +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@twyatt twyatt marked this pull request as ready for review March 7, 2024 03:31
@twyatt twyatt requested review from cedrickcooke and a team as code owners March 7, 2024 03:31
@twyatt twyatt enabled auto-merge (squash) March 7, 2024 03:33
@twyatt twyatt merged commit 2816f29 into main Mar 7, 2024
3 checks passed
@twyatt twyatt deleted the twyatt/codecov-config branch March 7, 2024 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance General maintenance that doesn't effect the public API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants