File tree 1 file changed +33
-0
lines changed
1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change @@ -314,6 +314,39 @@ jobs:
314
314
--maxfail=50 --timeout=300 --durations=25 \
315
315
--cov-report=xml --cov=lib --log-level=DEBUG --color=yes
316
316
317
+ - name : Cleanup non-failed image files
318
+ run : |
319
+ function remove_files() {
320
+ local extension=$1
321
+ find ./result_images -type f -name "*-expected*.$extension" | while read file; do
322
+ if [[ $file == *"-expected_pdf"* ]]; then
323
+ base=${file%-expected_pdf.$extension}_pdf
324
+ elif [[ $file == *"-expected_eps"* ]]; then
325
+ base=${file%-expected_eps.$extension}_eps
326
+ elif [[ $file == *"-expected_svg"* ]]; then
327
+ base=${file%-expected_svg.$extension}_svg
328
+ else
329
+ base=${file%-expected.$extension}
330
+ fi
331
+ if [[ ! -e "${base}-failed-diff.$extension" ]]; then
332
+ if [[ -e "$file" ]]; then
333
+ rm "$file"
334
+ echo "Removed $file"
335
+ fi
336
+ if [[ -e "${base}.$extension" ]]; then
337
+ rm "${base}.$extension"
338
+ echo " Removed ${base}.$extension"
339
+ fi
340
+ fi
341
+ done
342
+ }
343
+
344
+ remove_files "png"; remove_files "svg"; remove_files "pdf"; remove_files "eps";
345
+
346
+ if [ "$(find ./result_images -mindepth 1 -type d)" ]; then
347
+ find ./result_images/* -type d -empty -delete
348
+ fi
349
+
317
350
- name : Filter C coverage
318
351
run : |
319
352
if [[ "${{ runner.os }}" != 'macOS' ]]; then
You can’t perform that action at this time.
0 commit comments