You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#!/bin/bash
reference_files=`find /home/mathew-savage/Downloads/example_2_*`
# run imagemagick compare for all files
results=()
for file in $reference_files
do
filename=`basename $file`
result=`compare -metric mae /home/mathew-savage/Downloads/${filename} /home/mathew-savage/Downloads/result/${filename} difference_${filename}.png 2>&1`
similarity=`echo $result | grep -oP '(?<=\().+?(?=\))'`
similarity_percent="$(echo "$similarity * 100" | bc)"
results+=($similarity_percent)
printf "%s: difference from reference: %0.4f%% \n" $file $similarity_percent
done
# return 1 if any file is over threshold
for result in ${results[@]}
do
if (( $(echo "$result > 0.01" | bc -l) )); then
exit 1
fi
done
exit 0
There should be a way to automatically check that there has been no visual change in the PDFs produced by the actions pipeline
The text was updated successfully, but these errors were encountered: