parse-community / Parse-SDK-Android

The Android SDK for Parse Platform
https://parseplatform.org/
Other
1.88k stars 735 forks source link

ci: Fix codecov not reporting #1216

Closed mtrezza closed 3 months ago

mtrezza commented 3 months ago

New Pull Request Checklist

Issue Description

Codecov not reporting, see:

https://github.com/parse-community/Parse-SDK-Android/actions/runs/10430424460/job/28890986911?pr=1213

Approach

Fix codecov.

parse-github-assistant[bot] commented 3 months ago

I will reformat the title to use the proper commit message syntax.

parse-github-assistant[bot] commented 3 months ago

Thanks for opening this pull request!

parse-github-assistant[bot] commented 3 months ago

I will reformat the title to use the proper commit message syntax.

codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 66.45%. Comparing base (83aec68) to head (fdd9488). Report is 1 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1216 +/- ## ============================================= + Coverage 0.00% 66.45% +66.45% - Complexity 0 2275 +2275 ============================================= Files 124 124 Lines 10076 10076 Branches 1359 1359 ============================================= + Hits 0 6696 +6696 + Misses 10076 2845 -7231 - Partials 0 535 +535 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

abubkr-hago commented 3 months ago

I think code coverage is incorrectly configured in the gradle build, I opened index.html in parse/build/jacoco/jacocoHtml and it looks like it is producing a 100% missed coverage.

jacoco_html Can you confirm this as well?

mtrezza commented 3 months ago

I haven't tested this locally, but that may be what is causing the 0 coverage.

mtrezza commented 3 months ago

@abubkr-hago Good news, I got the coverage report working. The tests were not executed hence no coverage. Bad news, 9 tests are failing. Would you want to look into how to fix them? It doesn't seem to be anything major, only test-internal things. I've opened https://github.com/parse-community/Parse-SDK-Android/issues/1217 for that.

abubkr-hago commented 3 months ago

Nice Work, I'll definitely give them a look.

abubkr-hago commented 3 months ago

The tests were not executed hence no coverage.

If you meant the tests were not running locally, can you try changing AndroidStudio JDK to 11 and try with JUnitPlatform enabled?. With this approach Jacoco generates 0% coverage reports for me.