This sample application will describe how to configure code coverage using Jacoco plugin. It covers following points.
-
How to enable Code Coverage for given project.
-
How to include rules for exclude/include certain class from code Coverage.
-
How to set up build pipe-line in GitHub to enforce these rule. In case if the rule is not satisfied build will fail.
-
This example will deploy an app in two different environment dev,prod. Whenever code is merged with main branch prod app is deployed similarly whenever dev branch is merged dev app is getting deployed.
https://herokuautodeploy-test.herokuapp.com/actuator/health
Jacoco Ref
https://reflectoring.io/jacoco/
https://docs.gradle.org/current/userguide/jacoco_plugin.html
https://docs.gradle.org/current/samples/sample_jvm_multi_project_with_code_coverage.html
Environment Specifid Deploy