Skip to content

Commit

Permalink
chore(green-coding-solutions#7): length comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
jreimone committed Apr 14, 2023
1 parent ba6a0db commit cd1d7ca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/data-json-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ jobs:
output='${{ steps.data-node-setup.outputs.data-lap-json }}'
required_fields=("repository" "branch" "workflow" "run_id" "label" "cpu_avg_percent" "energy_joules" "power_avg_watts")
fields_count=$(echo "$output" | jq 'keys | length')
if [ "${fields_count}" -eq 8 ]; then
else
if ! [ "${fields_count}" -eq 8 ]; then
echo "output has ${fields_count} instead of 8"
exit 1
fi
for field in "${required_fields[@]}"; do
if ! echo "$output" | jq -e --arg field "$field" 'has($field)' >/dev/null; then
Expand Down

0 comments on commit cd1d7ca

Please sign in to comment.