ProductionIntermediate5h

CI/CD pipelines.

Automated test, build, and deploy on every push.

What is CI/CD?

Continuous integration runs your tests and checks automatically on every push, catching breakage before it merges. Continuous delivery extends that to building and deploying automatically once the checks pass. Together they turn shipping from a manual ritual into a reliable pipeline.

Why it matters

Manual deploys are slow and error-prone — the classic "it worked when I ran it by hand" problem. A pipeline makes every change go through the same tested, repeatable path, so deploys become boring and frequent. Every serious team expects you to work this way.

What to learn

  • The pipeline stages: install, lint, test, build, deploy
  • Triggering on push and pull request
  • Caching dependencies to keep runs fast
  • Required status checks before merge
  • Building and pushing a container image
  • Deploying on merge to the main branch
  • Secrets in pipelines, injected not committed

Common pitfall

A pipeline so slow that people skip or bypass it. If CI takes twenty minutes, developers stop waiting for it and the safety net frays. Cache dependencies, parallelize independent jobs, and run only what changed, so the pipeline stays fast enough that nobody is tempted to route around it.

Resources

Primary (free):

Practice

Add a CI workflow that installs dependencies, lints, and runs tests on every push and pull request, with dependency caching. Make it a required check before merge. Then add a deploy job that runs only on merge to main. Done when a broken test blocks a merge and a green merge deploys automatically.

Outcomes

  • Build a pipeline that lints, tests, and builds on every push.
  • Require passing checks before a branch can merge.
  • Cache and parallelize to keep CI fast.
  • Deploy automatically on merge with secrets injected safely.
Back to Backend roadmap