|
72 | 72 | - name: Install dependencies
|
73 | 73 | run: |
|
74 | 74 | python -m pip install --upgrade pip
|
75 |
| - pip install bump2version build twine |
| 75 | + pip install bump2version build twine psutil |
76 | 76 | pip install -e ".[all,dev]"
|
| 77 | + # Install memory monitoring tools |
| 78 | + pip install memory_profiler |
77 | 79 |
|
78 | 80 | - name: Configure git
|
79 | 81 | run: |
|
@@ -107,11 +109,26 @@ jobs:
|
107 | 109 | run: |
|
108 | 110 | python scripts/generate_changelog.py --beta --output BETA_CHANGELOG.md
|
109 | 111 |
|
110 |
| - - name: Run tests |
| 112 | + - name: Run tests with segfault protection |
| 113 | + env: |
| 114 | + # Memory optimization environment variables (set by run_tests.py) |
| 115 | + CI: true |
| 116 | + GITHUB_ACTIONS: true |
111 | 117 | run: |
|
112 |
| - python -m pytest tests/ -v --tb=short |
113 |
| - python -m pytest -m integration -v |
114 |
| - python -m pytest tests/benchmark_text_service.py -v |
| 118 | + # Print system memory info |
| 119 | + free -h || echo "free command not available" |
| 120 | + |
| 121 | + # Use our robust test runner that handles segfaults |
| 122 | + echo "Running main tests with segfault protection..." |
| 123 | + python run_tests.py tests/ -k "not benchmark and not integration" --no-header |
| 124 | + |
| 125 | + # Run integration tests separately with segfault protection |
| 126 | + echo "Running integration tests..." |
| 127 | + python run_tests.py -m integration --no-header |
| 128 | + |
| 129 | + # Run benchmark tests with segfault protection |
| 130 | + echo "Running benchmark tests with safeguards..." |
| 131 | + python run_tests.py tests/benchmark_text_service.py --no-header |
115 | 132 |
|
116 | 133 | - name: Build package
|
117 | 134 | run: |
|
|
0 commit comments