diff --git a/README.md b/README.md index 7af3f13..b1c77a8 100644 --- a/README.md +++ b/README.md @@ -8,15 +8,17 @@ The project also includes **logging**, a **log monitoring script**, and **automa ## 📂 Project Structure ``` fruit-api/ -│── fruit_api.py # Main Flask API -│── requirements.txt # Dependencies -│── Dockerfile # Docker support -│── log_monitor.sh # Log monitoring script -│── test_api.sh # Automated testing script -│── test_results.log # API tests logs -│── fruit_api.log # API logs -│── README.md # Documentation -│── .gitignore # Ignore venv/logs +│── fruit_api.py # Main Flask API +│── requirements.txt # Dependencies +│── Dockerfile # Docker support +│── log_monitor.sh # Log monitoring script +│── test_api.sh # Automated testing script +│── test_results.log # API tests logs +│── fruit_api.log # API logs +│── README.md # Documentation +│── .gitignore # Ignore venv/logs +│── .github/workflows/ci.yml # CI workflow for testing + ``` ## 📌 Features @@ -28,6 +30,8 @@ fruit-api/ - Bash script for monitoring logs (`log_monitor.sh`) with **error alerts (4xx/5xx)** - Bash script for automated API testing (`test_api.sh`) with ✅ / ❌ results - Swagger/OpenAPI documentation at `/docs` +- `CI/CD` pipeline for automated testing + --- @@ -163,6 +167,20 @@ After starting the API, open: --- +## ⚡ CI/CD Pipeline + +This project uses **Continuous Integration (CI)** to ensure the API works correctly after every code change. + +### Workflow +- Triggered on every **push** or **pull request** to `main` branch. +- Installs dependencies (`requirements.txt`). +- Starts the API in the background. +- Runs automated tests (`test_api.sh`). +- Pipeline **fails** if any test ❌ fails. + +--- + + ## 🐳 Docker Support ### Build the image @@ -176,4 +194,4 @@ docker run -p 5000:5000 fruit-api ``` ## 🎥 Project Record -[Watch the Demo](https://app.gitpasha.com/AhmedGamalYousef/Building-API-and-Monitoring-Logs/src/branch/main/demo/APIProject.mp4) +[Watch the Demo](https://app.gitpasha.com/AhmedGamalYousef/Building-API-and-Monitoring-Logs/src/branch/main/demo/APIProject.mp4) \ No newline at end of file