Skip to content

Commit

Permalink
code coverage fix for PR pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
markiantorno committed Jan 20, 2025
1 parent 0c3c0ae commit 31653b2
Showing 1 changed file with 19 additions and 13 deletions.
32 changes: 19 additions & 13 deletions .github/actions/compile-test-results/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,25 +24,31 @@ runs:
run: |
echo "Restoring artifacts to original locations..."
# List all artifacts for debugging
echo "Contents of ./artifacts directory:"
ls -l ./artifacts
# Process each artifact in the downloaded directory
for artifact_path in ./artifacts/*; do
artifact=$(basename "$artifact_path")
echo "Processing artifact: $artifact"
# Replace underscores with slashes to get the original module path
original_name=$(echo "$artifact" | sed 's|_|/|g')
echo "Restoring original name: $original_name"
if [ -d "$artifact_path" ]; then
artifact=$(basename "$artifact_path")
echo "Processing artifact: $artifact"
# Target directory for the restored artifact
target_dir="${original_name}"
# Convert artifact name back to original path
original_name=$(echo "$artifact" | sed 's|_|/|g')
# target_dir="${GITHUB_WORKSPACE}/${original_name}/target"
target_dir="${GITHUB_WORKSPACE}/${original_name}"
# Ensure the target directory exists
mkdir -p "$(dirname "$target_dir")"
echo "Restoring to target directory: $target_dir"
# Move the artifact to the target directory
mv "$artifact_path"/* "$target_dir"
# Ensure the target directory exists
mkdir -p "$target_dir"
mv "$artifact_path/${original_name}"/* "$target_dir/" || echo "Failed to move contents for $artifact"
echo "Restored artifact for: $original_name"
echo "Restored artifact for: $original_name"
else
echo "Artifact path $artifact_path is not a directory. Skipping."
fi
done
echo "All artifacts have been restored to their original locations."
Expand Down

0 comments on commit 31653b2

Please sign in to comment.