From 70b3914512caa6e1eb9fa1c6550d6d38c006c408 Mon Sep 17 00:00:00 2001 From: Lars Eggert Date: Tue, 10 Sep 2024 04:07:11 -0700 Subject: [PATCH] ci: Only remove QNS logs for successful tests (#2096) * ci: Only remove QNS logs for successful tests * Strip quotes * Fix log location * Fixes * Finalize --- .github/actions/quic-interop-runner/action.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/actions/quic-interop-runner/action.yml b/.github/actions/quic-interop-runner/action.yml index 30a74c926f..d888bcf7fa 100644 --- a/.github/actions/quic-interop-runner/action.yml +++ b/.github/actions/quic-interop-runner/action.yml @@ -81,11 +81,16 @@ runs: FAILED=1 fi done - # Remove all log files > $MAX_SIZE to make the artifacts smaller. - MAX_SIZE=5M + # Remove all log files > $MAX_SIZE for succeeded tests to make the artifacts smaller. + MAX_SIZE=2M echo "Removed log file > $MAX_SIZE during GitHub workflow" > note.txt echo "Removing these log files > $MAX_SIZE:" - find ../logs -type f -size +$MAX_SIZE -ls -exec cp note.txt {} \; + SUCCEEDED=$(jq < ../result.json '. | .results[][] | select(.result == "succeeded").name' | tr -d '"') + for run in ../logs/*; do + for test in $SUCCEEDED; do + find "$run/$test" -type f -size +$MAX_SIZE -ls -exec cp note.txt {} \; + done + done exit $FAILED shell: bash