Skip to content

Commit

Permalink
chore(green-coding-solutions#7): add spaces in the if conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
jreimone committed Apr 14, 2023
1 parent 5d48200 commit fa5e35b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/data-json-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ jobs:
if [ '${{ steps.data-node-setup.outputs.data-lap-json }}' == '' ]; then
echo "Output must not be empty"; exit 1;
fi
if ![$(echo '${{ steps.data-node-setup.outputs.data-lap-json }}' | jq 'has("repository", "branch", "workflow", "run_id", "label", "cpu_avg_percent", "energy_joules", "power_avg_watts") and length == 8')]; then
if ! [ $(echo '${{ steps.data-node-setup.outputs.data-lap-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
if ![$(echo '${{ steps.data-node-setup.outputs.data-lap-json }}' | jq '.label == "node setup"')]; then
if ! [ $(echo '${{ steps.data-node-setup.outputs.data-lap-json }}' | jq '.label == "node setup"') ]; then
echo "value of 'label' must be 'node setup'"; exit 1;
fi
Expand All @@ -68,10 +68,10 @@ jobs:
if [ '${{ steps.data-sleep.outputs.data-lap-json }}' == '' ]; then
echo "Output must not be empty"; exit 1;
fi
if ![$(echo '${{ steps.data-sleep.outputs.data-lap-json }}' | jq 'has("repository", "branch", "workflow", "run_id", "label", "cpu_avg_percent", "energy_joules", "power_avg_watts") and length == 8')]; then
if ! [ $(echo '${{ steps.data-sleep.outputs.data-lap-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
if ![$(echo '${{ steps.data-sleep.outputs.data-lap-json }}' | jq '.label == "sleep"')]; then
if ! [ $(echo '${{ steps.data-sleep.outputs.data-lap-json }}' | jq '.label == "sleep"') ]; then
echo "value of 'label' must be 'sleep'"; exit 1;
fi
Expand All @@ -92,6 +92,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 'has("repository", "branch", "workflow", "run_id", "label", "cpu_avg_percent", "energy_joules", "power_avg_watts") and length == 8')]; then
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 fa5e35b

Please sign in to comment.