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 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():