What should a CI/CD pipeline include?
A strong pipeline, in order:
- Pull request → scope and code-owner review → deterministic install
- Format, lint, typecheck, unit tests
- Database migrations from a clean baseline + constraint and RLS tests
- Integration, API-contract and critical end-to-end tests
- SAST, secret scanning, dependency/SBOM and container/IaC scans
- Staging deploy + smoke tests + observability check
- Protected-branch gate and approved production promotion with serialised migrations
- Canary or feature flags, post-deploy checks, and a rollback decision
Release gates: exact commit SHA recorded, every required check green, production secrets isolated (short-lived cloud identity via OIDC), rollback tested for schema/auth/cache changes, demonstrated load capacity for the target, on-call contacts and runbooks ready. A broken CI runner is not a passed test — document the blocked gate instead of silently merging.