argoproj / argo-cd

Declarative Continuous Deployment for Kubernetes
https://argo-cd.readthedocs.io
Apache License 2.0
17.97k stars 5.47k forks source link

Add CI check to require unit test coverage on new lines of code #17300

Open crenshaw-dev opened 8 months ago

crenshaw-dev commented 8 months ago

Summary

CI needs to block PRs that have new lines of code but no test coverage.

Motivation

Code should be unit tested.

Proposal

Require >30% coverage. Low enough to not be obnoxious, but high enough to motivate some basic testing.

I believe the Rollouts repo does this.

leoluz commented 8 months ago

I think new code needs to have at least 70% coverage. We are facing issues and bugs that could be easily avoided by simple unit tests.