Skip to content

Commit

Permalink
chore(green-coding-solutions#7): shorten the assertion for the expect…
Browse files Browse the repository at this point in the history
…ed attributes
  • Loading branch information
jreimone committed Apr 14, 2023
1 parent 91d6ab4 commit 55c1916
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/data-json-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ jobs:
if [ '${{ steps.data-total.outputs.data-total-json }}' == '' ]; then
echo "Output must not be empty"; exit 1;
fi
if ! echo '${{ steps.data-total.outputs.data-total-json }}' | jq '.repository' > /dev/null 2>&1; then
echo "output must have 'repository'" >&2
exit 1
if ! echo '${{ steps.data-total.outputs.data-total-json }}' | jq 'has("repository", "branch", "workflow", "run_id", "label", "cpu_avg_percent", "energy_joules", "power_avg_watts") and length == 8'; then
echo "output has wrong structure"; exit 1;
fi

0 comments on commit 55c1916

Please sign in to comment.