Skip to content

Commit 4379e3f

Browse files
committed
normalized files
1 parent bdff146 commit 4379e3f

File tree

2 files changed

+61
-1
lines changed

2 files changed

+61
-1
lines changed

.gitattributes

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Auto detect text files and perform LF normalization
2+
* text=auto
3+
4+
# Force LF line endings for all text files
5+
* text eol=lf
6+
7+
# Explicitly set line endings for source files
8+
*.sol text eol=lf
9+
*.ts text eol=lf
10+
*.js text eol=lf
11+
*.json text eol=lf
12+
*.md text eol=lf
13+
*.yml text eol=lf
14+
*.yaml text eol=lf
15+
*.sh text eol=lf
16+
*.mjs text eol=lf
17+
18+
# Binary files
19+
*.png binary
20+
*.jpg binary
21+
*.jpeg binary
22+
*.gif binary
23+
*.pdf binary
24+
*.ico binary
25+
*.woff binary
26+
*.woff2 binary
27+
*.ttf binary
28+
*.eot binary
29+

.github/workflows/coverage.yml

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,16 @@ jobs:
2222
run: npm ci
2323

2424
- name: Setup environment variables
25-
run: cp .env.example .env
25+
run: |
26+
if [ ! -f .env.example ]; then
27+
echo "❌ ERROR: .env.example file is missing!"
28+
echo "This file must exist with FORK_BLOCK_NUMBER_* variables for deterministic coverage."
29+
exit 1
30+
fi
31+
cp .env.example .env
32+
echo "✅ Copied .env.example to .env"
33+
echo "📋 Fork block numbers configured:"
34+
grep "FORK_BLOCK_NUMBER" .env | head -10 || echo " ⚠️ No FORK_BLOCK_NUMBER variables found in .env.example"
2635
2736
- name: Get baseline from main branch
2837
run: |
@@ -75,6 +84,27 @@ jobs:
7584
echo "🔍 COVERAGE VALIDATION"
7685
echo "=================================================="
7786
87+
# Diagnostic: Show environment setup
88+
echo ""
89+
echo "📋 Environment Diagnostics:"
90+
echo " Node version: $(node --version)"
91+
echo " NPM version: $(npm --version)"
92+
if [ -f .env ]; then
93+
echo " .env file: EXISTS"
94+
echo " Fork block numbers in .env:"
95+
grep "FORK_BLOCK_NUMBER" .env | head -5 || echo " (none found)"
96+
else
97+
echo " .env file: MISSING"
98+
fi
99+
if [ -f .env.example ]; then
100+
echo " .env.example file: EXISTS"
101+
echo " Fork block numbers in .env.example:"
102+
grep "FORK_BLOCK_NUMBER" .env.example | head -5 || echo " (none found)"
103+
else
104+
echo " .env.example file: MISSING ⚠️"
105+
fi
106+
echo ""
107+
78108
# Parse CI-generated coverage using dedicated script
79109
CI_LINES=$(npx ts-node --files scripts/get-coverage-percentage.ts)
80110
@@ -98,6 +128,7 @@ jobs:
98128
echo ""
99129
echo " Expected: $PR_LINES% (from your committed coverage-baseline.json)"
100130
echo " Actual: $CI_LINES% (from fresh CI coverage run)"
131+
echo " Difference: $(awk "BEGIN {printf \"%.2f\", $PR_LINES - $CI_LINES}")%"
101132
echo ""
102133
echo "💡 This means either:"
103134
echo " 1. You forgot to run 'npm run coverage:update-baseline' locally"

0 commit comments

Comments
 (0)