Skip to content

Commit 3a6dca0

Browse files
committed
ci: increase large file limit from 1MB to 10MB
- Update CI workflow large file check from 1MB to 10MB - Add comprehensive exclusions for build artifacts, deps, and cache dirs - Update pre-commit large file check to match (10240KB) - Exclude .terraform/, .venv/, .ansible/, tmp/, node_modules/ directories The 1MB limit was too restrictive for infrastructure projects that may include documentation assets, configuration templates, and legitimate binary dependencies.
1 parent 113eb5d commit 3a6dca0

File tree

2 files changed

+25
-3
lines changed

2 files changed

+25
-3
lines changed

.github/workflows/ci.yml

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,30 @@ jobs:
8787
- name: Check for large files
8888
run: |
8989
echo "::group::Checking for large files"
90-
if find . -type f -size +1M -not -path "./.git/*" -not -path "./logs/*" -not -path "./.cache/*" | head -1; then
91-
echo "❌ Found large files (>1MB). Consider using Git LFS."
90+
if find . -type f -size +10M \
91+
-not -path "./.git/*" \
92+
-not -path "./logs/*" \
93+
-not -path "./.cache/*" \
94+
-not -path "./.terraform/*" \
95+
-not -path "./terraform/.terraform/*" \
96+
-not -path "./terraform/*/.terraform/*" \
97+
-not -path "./.venv/*" \
98+
-not -path "./.ansible/*" \
99+
-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 {} \;
92114
exit 1
93115
else
94116
echo "✅ No large files found"

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ repos:
6666
- id: check-yaml
6767
args: [--multi, --unsafe]
6868
- id: check-added-large-files
69-
args: [--maxkb=1024]
69+
args: [--maxkb=10240]
7070
- id: check-merge-conflict
7171
- id: check-case-conflict
7272
- id: mixed-line-ending

0 commit comments

Comments
 (0)