Skip to content

Commit 9cb8999

Browse files
committed
Debugging coverage check merge
1 parent d21f214 commit 9cb8999

File tree

1 file changed

+19
-3
lines changed

1 file changed

+19
-3
lines changed

.github/workflows/coverage-check-parallel.yml

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,11 @@ jobs:
9595
poetry run pytest "${{ matrix.test_file }}" "$TEST_FILTER" "$TEST_EXPRESSION" \
9696
--cov=src --cov-report=xml:$COVERAGE_FILE --cov-report=term \
9797
-v || [ $? -eq 5 ]
98+
99+
# Ensure .coverage file exists for merging (even if empty)
100+
if [ ! -f ".coverage" ]; then
101+
touch .coverage
102+
fi
98103
99104
- name: Upload coverage artifact
100105
uses: actions/upload-artifact@v4
@@ -153,13 +158,24 @@ jobs:
153158
fi
154159
155160
# Copy all coverage files with unique names
161+
echo "📁 Checking for coverage files in artifacts..."
156162
for artifact_dir in coverage_files/*/; do
157-
if [ -f "$artifact_dir/.coverage" ]; then
158-
artifact_name=$(basename "$artifact_dir")
159-
cp "$artifact_dir/.coverage" ".coverage.$artifact_name"
163+
if [ -d "$artifact_dir" ]; then
164+
echo "Artifact: $(basename "$artifact_dir")"
165+
ls -la "$artifact_dir" || echo " (empty or inaccessible)"
166+
if [ -f "$artifact_dir/.coverage" ]; then
167+
artifact_name=$(basename "$artifact_dir")
168+
cp "$artifact_dir/.coverage" ".coverage.$artifact_name"
169+
echo " ✅ Copied .coverage file"
170+
else
171+
echo " ⚠️ No .coverage file found"
172+
fi
160173
fi
161174
done
162175
176+
echo "Available .coverage files for merging:"
177+
ls -la .coverage.* 2>/dev/null || echo "No .coverage.* files found"
178+
163179
# Combine all coverage data (ignore if no files found)
164180
poetry run coverage combine .coverage.* 2>/dev/null || true
165181
poetry run coverage xml 2>/dev/null || echo '<coverage lines-covered="0" lines-valid="1"></coverage>' > coverage.xml

0 commit comments

Comments
 (0)