CI/CD automates the path from a code change to production. Continuous Integration runs your tests on every push, so regressions are caught immediately; Continuous Delivery/Deployment ships passing code automatically. Together they make releases fast, frequent and safe.
A GitHub Actions pipeline
A workflow file defines steps that run on every push — check out the code, set up Python, install, test:
name: CIon: [push, pull_request]jobs:test:runs-on: ubuntu-lateststeps:- uses: actions/checkout@v4- uses: actions/setup-python@v5with: { python-version: "3.12" }- run: pip install -r requirements.txt- run: ruff check . # lint- run: pytest --cov # test with coverage
CI vs CD
- CI — on every push/PR, run lint + tests so the main branch stays healthy and broken code never merges.
- Continuous Delivery — every passing change is ready to release at the click of a button.
- Continuous Deployment — every passing change ships to production automatically.
Key takeaways
- 01CI runs lint + tests automatically on every push/PR to keep main healthy.
- 02Continuous Delivery keeps every passing change ready to release; Deployment ships it automatically.
- 03GitHub Actions (and similar) define pipelines as YAML workflows.
- 04Require the CI check to pass before merging.
- 05Fast automated feedback makes releases routine, not risky.
