examples/go-integration-coverage/README.md
Example showing how to use Skaffold and ko to collect coverage profiles from integration tests, often called end-to-end tests, for Kubernetes workloads written in Go.
For a detailed explanation of how this example works, see the tutorial Go integration test coverage profiles on the Skaffold website.
If you are using a remote Kubernetes cluster, configure Skaffold to use your image registry:
export SKAFFOLD_DEFAULT_REPO=[your image registry, e.g., gcr.io/$PROJECT_ID]
You can skip this step if you are using a local Kubernetes cluster such as kind or minikube.
Build the container image with support for coverage profile collection, deploy the Kubernetes resource, run the integration tests, and collect the coverage profile data:
skaffold run --profile=coverage
The coverage profile data files will be in the directory reports.
When you are done, remove the resources from your cluster:
skaffold delete