Any template for displaying Kover code coverage in...
# code-coverage
j
Any template for displaying Kover code coverage in GitLab MRs?
c
🙌 1
This entire repository is a template project for Kotlin Multiplatform apps/libs with Gradle and fully configured CI (it's very opinionated).
j
Does it only work for the JVM target?
c
Yes, Kover only works for the JVM target (for now?)
To see the generated HTML coverage report: • go to the job's page (https://gitlab.com/opensavvy/playgrounds/gradle/-/jobs/6432169232) • on the right side, click 'browse' • navigate to the index.html file • go through the redirection to GitLab Pages • you end up here: https://opensavvy.gitlab.io/-/playgrounds/gradle/-/jobs/6432169232/artifacts/jvm-cover-report/index.html (it's normal that it's empty in this project)
j
Okay because I could get jvm+android+common uploaded here: https://wallywallet.gitlab.io/android/
But the coverage is not displayed in the GitLab UI in any way
c
Android counts as JVM so it should work as well
Ah, yes, please follow https://gitlab.com/opensavvy/playgrounds/gradle/-/issues/36 for visualisation directly in the code, I haven't done it yet. I'm hoping to do it somewhere around next week
j
Or... actually I can get the percentage displayed
Okay nice
c
The percentage should be displayed right under the "merge" button with what my setup: https://gitlab.com/opensavvy/playgrounds/gradle/-/merge_requests/55/diffs?commit_id=b480d99e225c57c5b61f8a38baa446c8bfcb91ce (it won't show in this specific project because it's an empty template, but I tested it and this setup does work)
j
Yeah, we have that, too, missing the test coverage visualization. Same as your #36
👍 1
c
I tried to get it working about a year ago but didn't manage at the time. I'm planning on trying again soon™
👀 1