From 78f13364ae5d4cf8ab262c7ab01b25a03e9e9531 Mon Sep 17 00:00:00 2001 From: Kavindu Jayawardana Date: Mon, 28 Jul 2025 16:32:31 +0530 Subject: [PATCH 1/2] Enhance home JSON to include demo greeting --- app/routes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/routes.py b/app/routes.py index 8aa3782..b755027 100644 --- a/app/routes.py +++ b/app/routes.py @@ -5,7 +5,7 @@ @app.route('/') def home(): - return jsonify({ "status": "ok" }) + return jsonify({ "status": "ok", "message": "Hello from Kavindu’s CI/CD demo!" }) @app.route('/menu') def menu(): From 11b81b341bd0afdca92799eab6e8aa196a8b4f50 Mon Sep 17 00:00:00 2001 From: Kavindu Jayawardana Date: Mon, 28 Jul 2025 17:16:03 +0530 Subject: [PATCH 2/2] Create CI.yml --- .github/workflows/main.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..d7a5d12 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,27 @@ +on: + push: + branches: [ main ] +name: CI Pipeline + +on: + push: + branches: [ main ] + +jobs: + build-and-test: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up Python 3.8 + uses: actions/setup-python@v4 + with: + python-version: '3.8' + + - name: Install dependencies + run: pip install -r requirements.txt + + - name: Run tests + run: python -m unittest discover