هذا الالتزام موجود في:
35
.github/workflows/ci.yml
مباع
Normal file
35
.github/workflows/ci.yml
مباع
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
name: CI - Fruit API
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ "main" ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ "main" ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-and-test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Set up Python
|
||||||
|
uses: actions/setup-python@v4
|
||||||
|
with:
|
||||||
|
python-version: "3.10"
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
python -m pip install --upgrade pip
|
||||||
|
pip install -r requirements.txt
|
||||||
|
|
||||||
|
- name: Run API in background
|
||||||
|
run: |
|
||||||
|
nohup python fruit_api.py &
|
||||||
|
sleep 5
|
||||||
|
|
||||||
|
- name: Run API tests
|
||||||
|
run: |
|
||||||
|
chmod +x test_api.sh
|
||||||
|
./test_api.sh
|
المرجع في مشكلة جديدة
حظر مستخدم