@@ -209,3 +209,58 @@ Pull requests are welcome! Please follow the existing code style and add tests f
209209
210210## License
211211MIT
212+
213+ ## Recent Changes & Improvements
214+
215+ ### Docker & HTTPS
216+ - The API now supports HTTPS in Docker using a development certificate.
217+ - Default HTTPS port is ` 9443` (see `compose.yaml` and `appsettings.json`).
218+ - Access the API in Docker at : ` https://localhost:9443/swagger`
219+
220+ # ## Email Notification Reliability
221+ - The `Email` section in `appsettings.json` now includes a required `To` field to avoid null recipient errors.
222+ - SMTP configuration keys in code were fixed to match the settings (`SmtpHost`, `SmtpPort`).
223+
224+ # ## CI/CD Pipeline
225+ - The GitHub Actions workflow (`.github/workflows/ci-cd.yml`) now includes :
226+ - Build, test (unit & integration), and artifact upload.
227+ - Docker image build and push to DockerHub.
228+ - Docker Compose deployment.
229+ - Mailpit service for email integration tests, ensuring all tests pass in CI.
230+
231+ # # How to Check if the Application is Running
232+
233+ # ## Locally (Docker)
234+ 1. Run :
235+ ` ` ` sh
236+ docker compose up -d
237+ ` ` `
238+ 2. Visit :
239+ - API : ` https://localhost:9443/swagger`
240+ - Mailpit UI : ` http://localhost:8025`
241+ 3. Check logs :
242+ ` ` ` sh
243+ docker compose logs app
244+ ` ` `
245+
246+ # ## In CI/CD (GitHub Actions)
247+ - On every push/PR to `main`, the workflow will :
248+ - Build and test the app.
249+ - Deploy the latest image with Docker Compose.
250+ - You can view workflow status and logs in the GitHub Actions tab.
251+
252+ # # Testing
253+
254+ The project includes comprehensive unit and integration tests :
255+
256+ - **Unit Tests:** Located in `tests/BookLibraryAPI.UnitTests`. Run with:
257+ ` ` ` sh
258+ dotnet test tests/BookLibraryAPI.UnitTests/BookLibraryAPI.UnitTests.csproj
259+ ` ` `
260+ - **Integration Tests:** Located in `tests/BookLibraryAPI.IntegrationTests`. These use Testcontainers for PostgreSQL, Redis, and Mailpit. Run with:
261+ ` ` ` sh
262+ dotnet test tests/BookLibraryAPI.IntegrationTests/BookLibraryAPI.IntegrationTests.csproj
263+ ` ` `
264+ - **CI/CD:** All tests are automatically run in GitHub Actions on every push and pull request to `main`. Test results are uploaded as artifacts.
265+
266+ You can view test results in the GitHub Actions tab or by running the above commands locally.
0 commit comments