Skip to content

Commit

Permalink
pretty print
Browse files Browse the repository at this point in the history
  • Loading branch information
patel-bhavin committed Jul 2, 2024
1 parent 8098a33 commit 232403b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/unit-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
git status
git pull
source .venv/bin/activate
git checkout unit-testing
git checkout ${{ github.ref }}
cat summary_2.yml
# contentctl test --post-test-behavior never_pause mode:changes --mode.target-branch develop
Expand All @@ -71,17 +71,18 @@ jobs:

- name: Install dependencies
run: sudo apt-get install -y jq

- name: Print results
run: |
yq e '.summary' summary_2.yml -o=json | jq -r 'to_entries | .[] | "### \(.key)\n\(.value)\n"'
- name: Check Test Summary
run: |
git status
total_fail=$(cat summary_2.yml | yq e '.summary.total_fail' -)
total_fail=$(yq e '.summary.total_fail' summary_2.yml)
if [ "$total_fail" != "0" ]; then
echo "CI Failure: There are failed tests."
cat summary_2.yml | jq e '.summary' -
yq e '.summary' summary_2.yml -o=json | jq
exit 1
else
echo "CI Success: No failed tests."
Expand Down

0 comments on commit 232403b

Please sign in to comment.