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 Kover task to execute action after coverage evaluation #605

Open
shanshin opened this issue May 10, 2024 · 0 comments
Open

Add Kover task to execute action after coverage evaluation #605

shanshin opened this issue May 10, 2024 · 0 comments
Assignees
Labels
Feature Feature request issue type S: untriaged Status: issue reported but unprocessed

Comments

@shanshin
Copy link
Collaborator

shanshin commented May 10, 2024

What is your use-case and why do you need this feature?
In some cases, it is necessary to perform additional actions after measuring the coverage: for example, perform conditional verification, write values to the log, write the coverage values to the file in any form.

Kover cannot provide for all use cases.
However, we can provide a factory with which users can create tasks that perform coverage processing

Describe the solution you'd like

kover {
    reports {
        total {
            evaluations.create("myLog") {
               // use build caching
                isCacheable = false

                // action to execute
                action {
                    logger.info("Total coverage: ${lines.coveredPercentage}%")
                }

                // a way to get a task to specify future dependencies
                taskProvider
            }
        }
    }
}

and later executed via koverMyLogAction

Use cases: #545 and #419

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Feature request issue type S: untriaged Status: issue reported but unprocessed
Projects
None yet
Development

No branches or pull requests

1 participant