-
Notifications
You must be signed in to change notification settings - Fork 66
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
Adding config to fail the PR checks #10
Comments
Has this been implemented? if yes can someone please tell me how? |
As mentioned in #21 , the action returns two outputs "coverage-overall" and "coverage-changed-files", so you could add another step to your workflow and fail the PR based on these values (whichever is the one that you want). I am still thinking if we should have a config within the |
You can refer this PR for on how to make use of the "outputs" to fail a PR if it doesn't meet the threshold: thsaravana/jacoco-playground#16 |
The problem here is "on what criteria should we fail". In the next release, I am planning to add "coverage-diff". So different users can choose to Fail the PR based on different conditions. I think a better option would be just to Output these values from the Action, and then users can and a simple step (as mentioned above) on when to fail based on the output values. So closing this. I will update the README.md with the step on how to use the Output values to fail the PR. |
Can we add an option to "fail" the PR if the coverage does not meet the expected threshold? Although I guess we could just use: https://docs.gradle.org/current/userguide/jacoco_plugin.html#sec:jacoco_report_violation_rules
If I get time I'll raise a PR.
The text was updated successfully, but these errors were encountered: