Spaces:
Running
Running
Commit ·
2b5cb70
1
Parent(s): 8f693b7
fix: guard coverage.xml parse with file-existence check (CI crash fix)
Browse files- .github/workflows/ci.yml +4 -1
.github/workflows/ci.yml
CHANGED
|
@@ -84,7 +84,10 @@ jobs:
|
|
| 84 |
- name: Coverage summary
|
| 85 |
run: |
|
| 86 |
python -c "
|
| 87 |
-
import xml.etree.ElementTree as ET
|
|
|
|
|
|
|
|
|
|
| 88 |
tree = ET.parse('coverage.xml')
|
| 89 |
root = tree.getroot()
|
| 90 |
rate = float(root.attrib.get('line-rate', 0)) * 100
|
|
|
|
| 84 |
- name: Coverage summary
|
| 85 |
run: |
|
| 86 |
python -c "
|
| 87 |
+
import os, xml.etree.ElementTree as ET
|
| 88 |
+
if not os.path.exists('coverage.xml'):
|
| 89 |
+
print('coverage.xml not found — tests likely failed or coverage was not collected')
|
| 90 |
+
exit(0)
|
| 91 |
tree = ET.parse('coverage.xml')
|
| 92 |
root = tree.getroot()
|
| 93 |
rate = float(root.attrib.get('line-rate', 0)) * 100
|