You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
total_fail=$(yq e '.summary.total_fail' summary.yml)
78
77
79
-
- name: Check Test Summary
78
+
- name: Check if total_fail is greater than one
80
79
run: |
81
-
git status
82
-
total_fail=$(yq e '.summary.total_fail' summary_2.yml)
83
-
84
-
# Check if total_fail is greater than one
85
80
if [ "$total_fail" -gt 1 ]; then
86
81
echo "CI Failure: There are failed tests."
87
-
echo "Name | Status | Test Type"
88
-
echo "---- | ------ | ---------"
89
-
# Loop through each item in tested_detections and print required fields
90
-
yq e '.tested_detections[] | "\(.name) | \(.success) | \(.tests[].test_type)"' summary_2.yml
82
+
echo -e "Name | Status | Test Type"
83
+
echo -e "---- | ------ | ---------"
84
+
# Loop through each item in tested_detections and print required fields with color
85
+
yq e '.tested_detections[] | .name as $name | .success as $status | .tests[].test_type as $test_type | "\($name) | \($status) | \($test_type)"' summary.yml | while read line; do
0 commit comments