From 5ab976a484d904c9104b8c23c41a06525a6ed273 Mon Sep 17 00:00:00 2001 From: Dan Grebb Date: Fri, 26 Jan 2024 14:03:14 -0500 Subject: [PATCH] ci: remove whitespace from jq/diff commands --- .github/actions/sanity-test-checks/action.yml | 24 +------------- .github/actions/smoke-test-checks/action.yml | 31 +------------------ 2 files changed, 2 insertions(+), 53 deletions(-) diff --git a/.github/actions/sanity-test-checks/action.yml b/.github/actions/sanity-test-checks/action.yml index b0db609a6..bb0f96f65 100644 --- a/.github/actions/sanity-test-checks/action.yml +++ b/.github/actions/sanity-test-checks/action.yml @@ -23,29 +23,7 @@ runs: run: | set +e FIXTURE="test/__fixtures__/${{ inputs.FIXTURE }}" - TEST_RESULT=$(\ - diff -c \ - <(jq \ - 'walk(if type == "object" then with_entries(.value |= \ - if type == "object" or type == "array" \ - then . \ - else \ - "" \ - end) \ - else . \ - end)' \ - $FIXTURE) \ - <(jq \ - 'walk(if type == "object" then with_entries(.value |= \ - if type == "object" or type == "array" \ - then . \ - else \ - "" \ - end) \ - else . \ - end)' \ - test/configs/backstop_data/bitmaps_test/**/report.json) \ - ) + TEST_RESULT=$(diff -c <(jq 'walk(if type == "object" then with_entries(.value |= if type == "object" or type == "array" then . else "" end) else . end)' $FIXTURE) <(jq 'walk(if type == "object" then with_entries(.value |= if type == "object" or type == "array" then . else "" end) else . end)' test/configs/backstop_data/bitmaps_test/**/report.json)) echo "TEST_RESULT=$TEST_RESULT" >> $GITHUB_ENV if [[ "$TEST_RESULT" != "" ]]; then diff --git a/.github/actions/smoke-test-checks/action.yml b/.github/actions/smoke-test-checks/action.yml index aa9b5739e..1241e850b 100644 --- a/.github/actions/smoke-test-checks/action.yml +++ b/.github/actions/smoke-test-checks/action.yml @@ -23,36 +23,7 @@ runs: run: | set +e FIXTURE="test/__fixtures__/${{ inputs.FIXTURE }}" - TEST_RESULT=$(\ - diff -c \ - <(jq \ - 'walk(if type == "object" then with_entries(.value |= \ - if type == "object" or type == "array" - then . \ - else \ - "" \ - end) \ - else . \ - end) | \ - del(\ - .tests[].pair.diff, \ - .tests[].pair.diffImage \ - )'\ - $FIXTURE) \ - <(jq \ - 'walk(if type == "object" then with_entries(.value |= \ - if type == "object" or type == "array" \ - then . \ - else \ - "" \ - end) \ - else . \ - end) | \ - del(\ - .tests[].pair.diff, \ - .tests[].pair.diffImage\ - )' \ - test/configs/backstop_data/bitmaps_test/**/report.json)) + TEST_RESULT=$(diff -c <(jq 'walk(if type == "object" then with_entries(.value |= if type == "object" or type == "array" then . else "" end) else . end) | del( .tests[].pair.diff, .tests[].pair.diffImage)' $FIXTURE) <(jq 'walk(if type == "object" then with_entries(.value |= if type == "object" or type == "array" then . else "" end) else . end) | del( .tests[].pair.diff, .tests[].pair.diffImage)' test/configs/backstop_data/bitmaps_test/**/report.json)) echo "TEST_RESULT=$TEST_RESULT" >> $GITHUB_ENV if [[ "$TEST_RESULT" != "" ]]; then