@@ -188,14 +188,21 @@ jobs:
188188 with :
189189 pattern : " *-results"
190190 path : coverage-artifacts
191- merge-multiple : true
191+ merge-multiple : false
192192
193193 - name : Consolidate coverage files
194194 run : |
195195 set -e
196196 echo "Consolidating coverage files from all components..."
197197 mkdir -p consolidated-coverage
198198
199+ # Debug: Show what coverage artifacts were downloaded
200+ echo "Contents of coverage-artifacts directory:"
201+ find coverage-artifacts -type f -name "*.txt" -o -name "*.xml" | head -20
202+ echo "Specifically looking for coverage.txt files:"
203+ find coverage-artifacts -name "coverage.txt" -type f
204+ echo "Total coverage.txt files found: $(find coverage-artifacts -name "coverage.txt" -type f | wc -l)"
205+
199206 # Initialize consolidated coverage with mode line
200207 echo "mode: set" > consolidated-coverage/coverage.txt
201208
@@ -236,10 +243,17 @@ jobs:
236243 head -n 10 consolidated-coverage/coverage.txt
237244
238245 # Final validation of consolidated file
239- if ! go tool cover -func=consolidated-coverage/coverage.txt >/dev/null 2>&1; then
246+ echo "Validating consolidated coverage file..."
247+ if ! go tool cover -func=consolidated-coverage/coverage.txt >cover-validation.out 2>cover-validation.err; then
240248 echo "❌ ERROR: Consolidated coverage file failed validation"
249+ echo "go tool cover stdout:"
250+ cat cover-validation.out || echo "No stdout output"
251+ echo "go tool cover stderr:"
252+ cat cover-validation.err || echo "No stderr output"
241253 echo "Showing first 20 lines for debugging:"
242254 head -n 20 consolidated-coverage/coverage.txt
255+ echo "Showing last 20 lines for debugging:"
256+ tail -n 20 consolidated-coverage/coverage.txt
243257 exit 1
244258 fi
245259
@@ -380,14 +394,21 @@ jobs:
380394 with :
381395 pattern : " *-results"
382396 path : coverage-artifacts
383- merge-multiple : true
397+ merge-multiple : false
384398
385399 - name : Consolidate coverage files
386400 run : |
387401 set -e
388402 echo "Consolidating coverage files from all components for baseline..."
389403 mkdir -p consolidated-coverage
390404
405+ # Debug: Show what coverage artifacts were downloaded
406+ echo "Contents of coverage-artifacts directory:"
407+ find coverage-artifacts -type f -name "*.txt" -o -name "*.xml" | head -20
408+ echo "Specifically looking for coverage.txt files:"
409+ find coverage-artifacts -name "coverage.txt" -type f
410+ echo "Total coverage.txt files found: $(find coverage-artifacts -name "coverage.txt" -type f | wc -l)"
411+
391412 # Initialize consolidated coverage with mode line
392413 echo "mode: set" > consolidated-coverage/coverage.txt
393414
@@ -426,10 +447,17 @@ jobs:
426447 echo "Total coverage lines: $(wc -l < consolidated-coverage/coverage.txt)"
427448
428449 # Final validation of consolidated file
429- if ! go tool cover -func=consolidated-coverage/coverage.txt >/dev/null 2>&1; then
450+ echo "Validating consolidated coverage file..."
451+ if ! go tool cover -func=consolidated-coverage/coverage.txt >cover-validation.out 2>cover-validation.err; then
430452 echo "❌ ERROR: Consolidated coverage file failed validation"
453+ echo "go tool cover stdout:"
454+ cat cover-validation.out || echo "No stdout output"
455+ echo "go tool cover stderr:"
456+ cat cover-validation.err || echo "No stderr output"
431457 echo "Showing first 20 lines for debugging:"
432458 head -n 20 consolidated-coverage/coverage.txt
459+ echo "Showing last 20 lines for debugging:"
460+ tail -n 20 consolidated-coverage/coverage.txt
433461 exit 1
434462 fi
435463
0 commit comments