Commit 5ccd6af
CI: switch to coverage-run pattern to dodge torch+pytest-cov segfault
The hosted Linux runner's torch + Python 3.12.13 + pytest-cov
combination segfaults at conftest-import time when the coverage
tracer starts before torch's C extension finishes initializing.
PR-N1's first 2 CI runs both failed with:
ImportError while loading conftest 'tests/conftest.py'.
tests/conftest.py:14: in <module>
import torch
E ValueError: module functions cannot set METH_CLASS or
METH_STATIC
Segmentation fault (core dumped)
The Mac M4 reviewer scripts already use 'coverage run -m pytest'
+ post-hoc 'coverage report --include' to avoid this race
(commit 9d1a250 documented the workaround). Same pattern applied
to the CI workflow here.
Behavior preserved: 100% coverage gate on the same set of modules,
junit.xml + coverage.xml artifacts as before.
Co-authored-by: FluffyAIcode <FluffyAIcode@users.noreply.github.com>1 parent 5adb4dc commit 5ccd6af
1 file changed
Lines changed: 14 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | | - | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
84 | 92 | | |
85 | 93 | | |
86 | 94 | | |
| |||
89 | 97 | | |
90 | 98 | | |
91 | 99 | | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | 100 | | |
103 | 101 | | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
104 | 107 | | |
105 | 108 | | |
106 | 109 | | |
| |||
0 commit comments