Skip to content

Commit

Permalink
Fail workflow on step failure
Browse files Browse the repository at this point in the history
  • Loading branch information
farshidz committed Feb 4, 2025
1 parent 64822ff commit 11cdfc6
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ jobs:
pip install -r marqo/requirements.dev.txt
- name: Run unit tests
id: run_unit_tests
continue-on-error: true
run: |
cd marqo
Expand All @@ -61,6 +62,7 @@ jobs:
tests/unit_tests/ | tee pytest_output.txt
- name: Check new code coverage
id: check_test_coverage
if: github.event_name == 'pull_request'
run: |
cd marqo
Expand All @@ -86,3 +88,10 @@ jobs:
echo '```' >> $GITHUB_STEP_SUMMARY
cat marqo/diff_cov.md >> $GITHUB_STEP_SUMMARY
- name: Fail if tests or coverage failed
if: ${{ steps.run_unit_tests.outcome == 'failure' || steps.check_test_coverage.outcome == 'failure' }}
run: |
echo "Tests or coverage checks failed. Marking job as failed."
exit 1
shell: bash

0 comments on commit 11cdfc6

Please sign in to comment.