Skip to content

Commit c9abdf5

Browse files
committed
fix(ci): split test execution to prevent memory segfault
- Run full test suite without coverage collection first - Collect coverage only on core modules to reduce memory pressure - Add .coveragerc configuration for better memory management - Address persistent exit code 139 in CI environment
1 parent c9820c6 commit c9abdf5

File tree

2 files changed

+34
-2
lines changed

2 files changed

+34
-2
lines changed

.coveragerc

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
[run]
2+
source = datafog
3+
omit =
4+
*/tests/*
5+
*/test_*
6+
*/__pycache__/*
7+
*/venv/*
8+
*/env/*
9+
setup.py
10+
11+
[report]
12+
exclude_lines =
13+
pragma: no cover
14+
def __repr__
15+
if self.debug:
16+
if settings.DEBUG
17+
raise AssertionError
18+
raise NotImplementedError
19+
if 0:
20+
if __name__ == .__main__.:
21+
class .*\bProtocol\):
22+
@(abc\.)?abstractmethod
23+
24+
[xml]
25+
output = coverage.xml
26+
27+
[html]
28+
directory = htmlcov

.github/workflows/ci.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,13 @@ jobs:
4444
pip install -e ".[all]"
4545
pip install -r requirements-dev.txt
4646
47-
- name: Run full test suite
47+
- name: Run test suite (without coverage)
4848
run: |
49-
python -m pytest tests/ --cov=datafog --cov-report=xml
49+
python -m pytest tests/ -v
50+
51+
- name: Run coverage on core modules only
52+
run: |
53+
python -m pytest tests/test_text_service.py tests/test_regex_annotator.py tests/test_anonymizer.py --cov=datafog --cov-report=xml --cov-config=.coveragerc
5054
5155
- name: Upload coverage
5256
uses: codecov/codecov-action@v4

0 commit comments

Comments
 (0)