TL;DR
  • A green CI doesn’t mean working software
  • Layer tests: unit, integration, contract, visual, load
  • Add quality gates on coverage, performance, and bundle size
  • Run security scans on every PR, not quarterly
  • Fail fast — slow pipelines get ignored

Most CI pipelines are green-checkmark theatre. They run unit tests, a linter, maybe a build. They catch none of the bugs that actually ship. Here’s the pipeline we run on every production codebase.

Phase 01 · Static

Lint, type-check, and scan before tests run

Failed lints, type errors, and known vulnerabilities should kill the build before any test runs. This stage should complete in under 60 seconds — if it takes longer, developers will push without running it locally.

  • Lint with autofix enabled for reformattable rules
  • Type-check with strict mode on
  • Dependency vulnerability scan (npm audit, Snyk, etc.)
  • Secret scanner on every commit
Phase 02 · Tests

Pyramid, not ice-cream cone

Lots of unit tests. Some integration tests. A handful of end-to-end tests. The reverse pyramid — tons of slow E2E, few unit — is how teams end up with 30-minute pipelines that nobody trusts.

Phase 03 · Contracts

Consumer-driven contract tests catch integration drift

If service A and service B drift in their API contract, you want to know at PR time, not at deploy time. Contract testing (Pact, Spring Cloud Contract) is the cheapest insurance you can buy against integration bugs.

Phase 04 · Gates

Quality gates that block bad merges

Coverage below threshold? Block. Bundle size increased by more than 5%? Block. Performance regression on critical path? Block. Make the gates explicit and visible — PR authors should know why they failed without asking.

This is the pipeline we ship with every product under Systems Integration. Pipelines that actually catch bugs are infrastructure, not overhead.