From dfea66742158d91d1d53764ec1db356808943bef Mon Sep 17 00:00:00 2001 From: Michael Montanaro <84359773+montymi@users.noreply.github.com> Date: Wed, 6 Mar 2024 22:57:13 -0500 Subject: [PATCH] adding test result analysis --- .github/workflows/python-app.yml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 53c3489..490a605 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -35,8 +35,17 @@ jobs: run: | pip install -r requirements.txt - - name: Run tests + - name: Run Python script + id: test_result run: | - cd src - python test_main.py + python test_main.py || echo "Test failed" + + - name: Determine test result + run: | + if [[ "${{ steps.test_result.outputs.stdout }}" == *"OK"* ]]; then + echo "Test passed" + else + echo "Test failed" + exit 1 + fi