A reusable, production-ready CI/CD pipeline template for Python projects — built with GitHub Actions, Docker, and best practices in testing, linting, and deployment.
You can drop this workflow into any Python project.
- ✅ Automated testing with pytest
- ✅ Code quality enforcement via black + ruff
- ✅ Docker builds
- ✅ CI/CD via GitHub Actions
- ✅ Push Docker image to GitHub Container Registry (GHCR)
| Tool | Purpose |
|---|---|
| 🐍 Python 3.10 | (test) Application logic |
| 🧪 pytest | Unit testing |
| 🎨 black + ruff | Linting & formatting |
| 🐳 Docker | Containerization & local deployment |
| ⚙️ GitHub Actions | Continuous Integration & Delivery |
| ☁️ GHCR | Container image hosting |
coming soon
- Convert this pipeline into a reusable workflow with inputs for
python-versionandimage-name. - Add optional authentication steps to support different container registries (e.g. GHCR, Docker Hub, AWS ECR, GCP Artifact Registry).
python-ci-pavedroad/
├── .github/
│ └── workflows/
│ └── python-deploy.yaml # CI pipeline
├── src/
│ └── app.py # Sample app
├── tests/
│ └── test_health.py # Unit tests
│ └── test_root.py # Unit tests
├── Dockerfile
├── .dockerignore
├── pyproject.toml
├── requirements.txt # Python dependencies
├── .pre-commit-config.yaml
├── .gitignore
└── README.md