Skip to content

Commit

Permalink
ci: remove whitespace from jq/diff commands
Browse files Browse the repository at this point in the history
  • Loading branch information
dgrebb committed Jan 26, 2024
1 parent 9ff6839 commit b77da6d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 53 deletions.
24 changes: 1 addition & 23 deletions .github/actions/sanity-test-checks/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
31 changes: 1 addition & 30 deletions .github/actions/smoke-test-checks/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b77da6d

Please sign in to comment.