Skip to content

Commit 4dffd23

Browse files
author
SentienceDEV
committed
ci: add bytecode cache cleanup and pre-test verification
1 parent 414f390 commit 4dffd23

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

.github/workflows/test.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ jobs:
3333
run: |
3434
pip cache purge || true
3535
pip uninstall -y sentienceapi || true
36+
# Clean any bytecode cache
37+
find . -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true
38+
find . -type f -name "*.pyc" -delete 2>/dev/null || true
3639
pip install --no-cache-dir -e ".[dev]"
3740
pip install pre-commit mypy types-requests
3841
@@ -86,6 +89,22 @@ jobs:
8689
echo "Extension directory not found, skipping build"
8790
fi
8891
92+
- name: Pre-test verification
93+
shell: bash
94+
run: |
95+
echo "=== Final check before tests ==="
96+
python -c "
97+
from sentience.agent_runtime import AgentRuntime
98+
import inspect
99+
source = inspect.getsource(AgentRuntime.assert_done)
100+
print('assert_done source:')
101+
print(source)
102+
if 'assertTrue' in source:
103+
print('ERROR: assertTrue found in assert_done!')
104+
exit(1)
105+
print('OK: assert_ is used correctly')
106+
"
107+
89108
- name: Run tests
90109
run: |
91110
pytest tests/ -v

0 commit comments

Comments
 (0)