From 4c31f35c10c57e727f62e49b7a40a91c9b737eea Mon Sep 17 00:00:00 2001 From: Pranav Raghu <73378019+Impaler343@users.noreply.github.com> Date: Fri, 8 Mar 2024 01:56:47 +0000 Subject: [PATCH 1/3] Deleting all images that have passed tests before upload Modified code to delete all types of files which have not failed Minor extension handling Checking if file exists before deleting Did not delete directories --- .github/workflows/tests.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a825b4cf263b..d24c1533d476 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -318,6 +318,35 @@ jobs: --maxfail=50 --timeout=300 --durations=25 \ --cov-report=xml --cov=lib --log-level=DEBUG --color=yes + - name: Cleanup non-failed image files + run: | + function remove_files() { + local extension=$1 + find ./result_images -type f -name "*-expected*.$extension" | while read file; do + if [[ $file == *"-expected_pdf"* ]]; then + base=${file%-expected_pdf.$extension}_pdf + elif [[ $file == *"-expected_eps"* ]]; then + base=${file%-expected_eps.$extension}_eps + elif [[ $file == *"-expected_svg"* ]]; then + base=${file%-expected_svg.$extension}_svg + else + base=${file%-expected.$extension} + fi + if [[ ! -e "${base}-failed-diff.$extension" ]]; then + if [[ -e "$file" ]]; then + rm "$file" + echo "Removed $file" + fi + if [[ -e "${base}.$extension" ]]; then + rm "${base}.$extension" + fi + echo "Removed $file" + fi + done + } + + remove_files "png"; remove_files "svg"; remove_files "pdf"; remove_files "eps"; + - name: Filter C coverage run: | if [[ "${{ runner.os }}" != 'macOS' ]]; then From ea7d16e10cb990feefd8617fcefddcfb1052c055 Mon Sep 17 00:00:00 2001 From: Pranav Raghu <73378019+Impaler343@users.noreply.github.com> Date: Tue, 12 Mar 2024 18:37:54 +0000 Subject: [PATCH 2/3] Minor Debug Print Fix --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d24c1533d476..9a1b31de7ce4 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -339,8 +339,8 @@ jobs: fi if [[ -e "${base}.$extension" ]]; then rm "${base}.$extension" + echo " Removed ${base}.$extension" fi - echo "Removed $file" fi done } From 8883d69292695e69887ac00126d38787804e2422 Mon Sep 17 00:00:00 2001 From: Pranav Raghu Date: Sat, 16 Mar 2024 12:04:08 +0530 Subject: [PATCH 3/3] Deleted empty directories in result_images folder --- .github/workflows/tests.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9a1b31de7ce4..8e45fa60d6a7 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -347,6 +347,10 @@ jobs: remove_files "png"; remove_files "svg"; remove_files "pdf"; remove_files "eps"; + if [ "$(find ./result_images -mindepth 1 -type d)" ]; then + find ./result_images/* -type d -empty -delete + fi + - name: Filter C coverage run: | if [[ "${{ runner.os }}" != 'macOS' ]]; then pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy