Skip to content

Commit

Permalink
added more verbose debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
erjosito committed Oct 4, 2024
1 parent b2f7f53 commit 34d35c3
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/translatev2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,28 +43,29 @@ jobs:
# Find out the impacted checklists
- id: climpact
if: ${{ steps.automationresult.outputs.excel_file_changed != 'yes' }}
name: Verify whether the modified files have an impact on the ALZ checklist
name: Verify whether the modified files have an impact on the defined v2 checklists
run: |
# Install Python dependencies to run the checklist CLI
pip install -r ./scripts/requirements.txt
# The list of impacted checklists will be passed as an array
impacted_cl_files=()
done_something=no
clv2_file_list=${{ steps.variables.outputs.clv2_file_list }}
echo "Checking the following ${#clv2_file_list[@]} v2 checklists for impact: ${clv2_file_list}..."
for cl_file in $clv2_file_list; do
echo "Processing v2 checklist $cl_file..."
cl_name=$(echo $cl_file | cut -d/ -f4 | cut -d. -f1)
cl_reco_files=$(python3 ./scripts/cl.py list-recos --input-folder ./v2/recos --checklist-file ./v2/checklists/alz.yaml --only-filenames)
cl_reco_files_count=$(echo "$cl_reco_files" | wc -l)
echo "$cl_reco_files_count reco files found referenced in the checklist $cl_file"
for input_file in ${{ steps.files.outputs.all }}; do
echo "Processing '$input_file'..."
echo "- Processing '$input_file'..."
if [[ "$cl_reco_files" == *"$input_file"* ]]; then
echo "Modification to file '$input_file' detected, which seems to be a reco leveraged by the checklist $cl_name in $cl_file"
echo " * Modification to file '$input_file' detected, which seems to be a reco leveraged by the checklist $cl_name in $cl_file"
impacted_cl_files+="$cl_file"
done_something=yes
else
echo "'$input_file' has no impact to the checklist $cl_name in $cl_file"
echo " * '$input_file' has no impact to the checklist $cl_name in $cl_file"
fi
done
done
Expand Down

0 comments on commit 34d35c3

Please sign in to comment.