Skip to content

Commit dc43e20

Browse files
committed
debug(ci): add detailed logging to large file check
- Show all files larger than 10MB before applying exclusions - Display which large files are tracked in git vs untracked - Add working directory context for debugging - Help identify why CI fails when local checks pass
1 parent 3a6dca0 commit dc43e20

File tree

1 file changed

+15
-16
lines changed

1 file changed

+15
-16
lines changed

.github/workflows/ci.yml

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,12 @@ jobs:
8787
- name: Check for large files
8888
run: |
8989
echo "::group::Checking for large files"
90-
if find . -type f -size +10M \
90+
echo "Current working directory: $(pwd)"
91+
echo "Listing all files larger than 10MB:"
92+
find . -type f -size +10M -exec ls -lh {} \; || echo "No files larger than 10MB found"
93+
94+
echo "Now checking with exclusions:"
95+
LARGE_FILES=$(find . -type f -size +10M \
9196
-not -path "./.git/*" \
9297
-not -path "./logs/*" \
9398
-not -path "./.cache/*" \
@@ -97,23 +102,17 @@ jobs:
97102
-not -path "./.venv/*" \
98103
-not -path "./.ansible/*" \
99104
-not -path "./tmp/*" \
100-
-not -path "./node_modules/*" | head -1; then
101-
echo "❌ Found large files (>10MB). Consider using Git LFS."
102-
find . -type f -size +10M \
103-
-not -path "./.git/*" \
104-
-not -path "./logs/*" \
105-
-not -path "./.cache/*" \
106-
-not -path "./.terraform/*" \
107-
-not -path "./terraform/.terraform/*" \
108-
-not -path "./terraform/*/.terraform/*" \
109-
-not -path "./.venv/*" \
110-
-not -path "./.ansible/*" \
111-
-not -path "./tmp/*" \
112-
-not -path "./node_modules/*" \
113-
-exec ls -lh {} \;
105+
-not -path "./node_modules/*")
106+
107+
if [ -n "$LARGE_FILES" ]; then
108+
echo "❌ Found large files (>10MB) that should be in Git LFS:"
109+
echo "$LARGE_FILES" | while read -r file; do
110+
ls -lh "$file"
111+
echo " → Tracked in git: $(git ls-files "$file" | grep -q . && echo 'YES' || echo 'NO')"
112+
done
114113
exit 1
115114
else
116-
echo "✅ No large files found"
115+
echo "✅ No problematic large files found"
117116
fi
118117
echo "::endgroup::"
119118

0 commit comments

Comments
 (0)