Merge branch 'feature/ci-pipeline-s1-09a-1' into 'develop'

Feature/ci pipeline s1 09a 1

See merge request proj-wise2526-video2document/video2document!7
This commit is contained in:
Aarthi Manivannan, Premanathan Aarthi Manivannan
2025-11-10 18:07:55 +01:00
6 changed files with 51 additions and 6 deletions
+33 -6
View File
@@ -1,6 +1,33 @@
build-job:
script:
- echo "Building the Project.."
test-job:
script:
- echo "Running Tests.."
workflow:
rules:
# Run the pipeline for merge requests or when committing to a branch
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: $CI_COMMIT_BRANCH
image: python:3.14.0
stages:
- setup
- test
setup_environment:
stage: setup
script:
- pip install --upgrade pip
- pip install -r requirements.txt
- echo "Dependencies installed successfully."
only:
- main
- feature/ci-pipeline-s1-09a-1 # You can add more branches if needed
test_app:
stage: test
script:
- echo "Running V2D Framework basic test..."
- python -m unittest discover || echo "No tests found."
only:
- main
- feature/ci-pipeline-s1-09a-1
View File
+7
View File
@@ -0,0 +1,7 @@
from fastapi import FastAPI
app = FastAPI()
@app.get("/health")
def health_check():
return {"status": "ok"}
+3
View File
@@ -0,0 +1,3 @@
fastapi
uvicorn
pytest
View File
+8
View File
@@ -0,0 +1,8 @@
from fastapi.testclient import TestClient
from app.main import app
client = TestClient(app)
def test_health():
response = client.get("/health")
assert response.status_code == 200