You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|**Lint & format**|`poetry run ruff check src tests`| Style and best-practice validations |
45
+
|**Type checking**|`poetry run mypy src tests`| Static type enforcement |
46
+
|**Unit tests**|`poetry run pytest -m "not integration"`| Fast, isolated tests—no DB required |
47
+
|**Integration tests**|`poetry run pytest -m integration`| Real-DB tests against Docker’s PostgreSQL |
48
+
|**DB migrations**|`poetry run alembic upgrade head`| Applies migrations to your local Docker-hosted DB |
49
+
50
+
> **Rationale:**
51
+
> Running tests or Alembic migrations inside Docker images would force you to mount the full source tree, install dev dependencies in each build, and copy over configs—**slowing down** your feedback loop and **limiting** IDE features.
52
+
53
+
---
54
+
55
+
## ⚙️ CI/CD with GitHub Actions
56
+
57
+
We maintain two jobs on the `develop` branch:
58
+
59
+
### 🔍 Quick (on Pull Requests)
60
+
61
+
* Ruff & MyPy
62
+
* Unit tests only
63
+
***No database** → < 1-minute feedback
64
+
65
+
### 🛠️ Full (on pushes to `develop`)
66
+
67
+
* All **Quick** checks
68
+
* Start a **PostgreSQL** service container
69
+
* Run **Alembic** migrations
70
+
* Execute **unit + integration** tests
71
+
* Build the **Docker** image
72
+
***Smoke-test** the `/health` endpoint
73
+
74
+
> **Guarantee:** Every commit in `develop` is style-checked, type-safe, DB-tested, and Docker-ready.
75
+
76
+
---
77
+
78
+
## 🧠 Summary
79
+
80
+
1.**Docker-Compose** for services & hot-reload of the app code
81
+
2.**Local** execution of migrations, tests, and QA for speed and IDE integration
82
+
3.**CI pipeline** split into quick PR checks and full develop-branch validation
83
+
84
+
This hybrid setup delivers **fast development** without sacrificing **production-grade safety** in CI.
0 commit comments