Skip to content

Commit

Permalink
udpating formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
patel-bhavin committed Jul 2, 2024
1 parent e36622a commit 73e5431
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/unit-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,15 @@ jobs:
- name: Check Test Summary
run: |
git status
total_fail=$(yq e '.summary.total_fail' summary_2.yml)
if [ "$total_fail" != "0" ]; then
total_fail=$(yq e '.summary.total_fail' summary.yml)
# Check if total_fail is greater than one
if [ "$total_fail" -gt 1 ]; then
echo "CI Failure: There are failed tests."
yq e '.summary' summary_2.yml -o=json | jq
exit 1
echo "Name | Status | Test Type"
echo "---- | ------ | ---------"
# Loop through each item in tested_detections and print required fields
yq e '.tested_detections[] | "\(.name) | \(.success) | \(.tests[].test_type)"' summary.yml
else
echo "CI Success: No failed tests."
fi
Expand Down

0 comments on commit 73e5431

Please sign in to comment.