Skip to content

Add test coverage using Kover#748

Merged
vegaro merged 1 commit into
update-agpfrom
test-coverage
Jan 20, 2023
Merged

Add test coverage using Kover#748
vegaro merged 1 commit into
update-agpfrom
test-coverage

Conversation

@vegaro

@vegaro vegaro commented Jan 20, 2023

Copy link
Copy Markdown
Member

Added test coverage for the project using Kover (https://kotlin.github.io/kotlinx-kover/)

We need to decide a report tool. We used coveralls in the past and it wasn't very good. I think we should try Codecov, which is pretty popular and free for open source projects.

For now I am just saving the reports in HTML and XML in CircleCI

@vegaro vegaro added the ci label Jan 20, 2023
@vegaro vegaro requested a review from a team January 20, 2023 02:25
Comment thread .circleci/config.yml
command: ./gradlew koverMergedHtmlReport
- run:
name: Kover XML
command: ./gradlew koverMergedXmlReport

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

we might want to have this as a separate job, but it will run pretty fast in this case since it runs after tests

Comment thread build.gradle
filters {
projects {
// Specifies the projects excluded from the merged tasks
excludes.addAll(":api-tester", ":integration-tests", ":examples:purchase-tester")

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It would complain I need to enable kover in all these projects if I don't disable them here

@tonidero tonidero left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Oh nice! I've only used Jacoco before. Been checking out the report and it looks great!

Have we thought about adding a minimum coverage? I'm just afraid we will end up overlooking coverage without some kind of test to verify it. Looks like in Kover you can establish bounds for coverage. But if we are planning to just try this out for now, this might be ok.

@vegaro

vegaro commented Jan 20, 2023

Copy link
Copy Markdown
Member Author

I haven't experimented with kover verify yet, but it's possible. Maybe it would be better to wait a bit until we have the system fully working and people are looking into it to add the verify, I don't want it to be an annoying thing to take care of right now when merging PRs

@vegaro vegaro merged this pull request into update-agp Jan 20, 2023
@vegaro vegaro deleted the test-coverage branch January 20, 2023 16:58
@vegaro vegaro restored the test-coverage branch January 20, 2023 16:59
@vegaro vegaro deleted the test-coverage branch January 20, 2023 16:59
vegaro added a commit that referenced this pull request Jan 20, 2023
vegaro added a commit that referenced this pull request Jan 20, 2023
@vegaro vegaro mentioned this pull request Jan 25, 2023
NachoSoto added a commit that referenced this pull request Jan 25, 2023
**This is an automatic release.**

### New Features
* Add `Purchases.logLevel` and deprecate `Purchases.debugLogsEnabled`
(#753) via NachoSoto (@NachoSoto)
### Bugfixes
* Avoid syncing attributes for users with blank user ids (#755) via Toni
Rico (@tonidero)
### Other Changes
* Fixed Readme.MD (#727) via AristiDevs (@ArisGuimera)
* Add codecov (#750) via Cesar de la Vega (@vegaro)
* Update AGP to 7.4.0 (#747) via Cesar de la Vega (@vegaro)
* Add test coverage using Kover (#748) via Cesar de la Vega (@vegaro)

Co-authored-by: revenuecat-ops <ops@revenuecat.com>
Co-authored-by: Cesar de la Vega <cesarvegaro@gmail.com>
Co-authored-by: NachoSoto <ignaciosoto90@gmail.com>
This was referenced May 30, 2023
@vegaro vegaro added pr:other and removed pr:ci labels Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants