هذا الالتزام موجود في:
36
README.md
36
README.md
@@ -8,15 +8,17 @@ The project also includes **logging**, a **log monitoring script**, and **automa
|
|||||||
## 📂 Project Structure
|
## 📂 Project Structure
|
||||||
```
|
```
|
||||||
fruit-api/
|
fruit-api/
|
||||||
│── fruit_api.py # Main Flask API
|
│── fruit_api.py # Main Flask API
|
||||||
│── requirements.txt # Dependencies
|
│── requirements.txt # Dependencies
|
||||||
│── Dockerfile # Docker support
|
│── Dockerfile # Docker support
|
||||||
│── log_monitor.sh # Log monitoring script
|
│── log_monitor.sh # Log monitoring script
|
||||||
│── test_api.sh # Automated testing script
|
│── test_api.sh # Automated testing script
|
||||||
│── test_results.log # API tests logs
|
│── test_results.log # API tests logs
|
||||||
│── fruit_api.log # API logs
|
│── fruit_api.log # API logs
|
||||||
│── README.md # Documentation
|
│── README.md # Documentation
|
||||||
│── .gitignore # Ignore venv/logs
|
│── .gitignore # Ignore venv/logs
|
||||||
|
│── .github/workflows/ci.yml # CI workflow for testing
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## 📌 Features
|
## 📌 Features
|
||||||
@@ -28,6 +30,8 @@ fruit-api/
|
|||||||
- Bash script for monitoring logs (`log_monitor.sh`) with **error alerts (4xx/5xx)**
|
- Bash script for monitoring logs (`log_monitor.sh`) with **error alerts (4xx/5xx)**
|
||||||
- Bash script for automated API testing (`test_api.sh`) with ✅ / ❌ results
|
- Bash script for automated API testing (`test_api.sh`) with ✅ / ❌ results
|
||||||
- Swagger/OpenAPI documentation at `/docs`
|
- 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
|
## 🐳 Docker Support
|
||||||
|
|
||||||
### Build the image
|
### Build the image
|
||||||
|
المرجع في مشكلة جديدة
حظر مستخدم