What should every CI/CD pipeline include to catch bugs early?
During the testing phase, the CI/CD pipeline should be able to catch bugs.
We can help it by providing steps that include linting and formatting.
Unit tests will provide quick feedback and can be run locally to catch the bugs even earlier.
Be sure to keep a check on the test code coverage. If that dips below 100% not all the code is being exercised.
As a rough, commonly cited baseline, many teams target somewhere around 70–80% line coverage as "healthy, not gamed" — chasing 100% usually means testing trivial getters instead of the logic that actually breaks in production.