Fixed the functional test failure by removing MODEL_ENDPOINT_0 from
the functional test step in GitHub Actions workflow.
The functional test test_initialize_model_map_with_env_vars sets its
own test endpoints (MODEL_ENDPOINT_1, MODEL_ENDPOINT_2) and was failing
because MODEL_ENDPOINT_0 from the workflow was interfering.
Changes:
- .github/workflows/test.yml: Removed MODEL_ENDPOINT_0 from functional test step
- .github/workflows/test.yml: Updated unit/integration tests to use hermes.ai.unturf.com
- tests/functional/test_guarded_ai.py: Fixed patch.dict to use clear=False
Unit and integration tests still have MODEL_ENDPOINT_0 configured
since they need it for app initialization. Functional tests now run
without env var interference and can test their own endpoint configs.
All 46 functional tests pass locally.
Fixed remaining 2 integration test failures:
1. Socketio mocking issue:
- Tests were setting app.socketio but activity module has its own reference
- Fixed by mocking activity.socketio directly instead of app.socketio
- Updated test_cancel_activity_integration to check both chat_message and activity_status events
- Updated test_display_activity_metadata_integration to use activity.socketio
2. GitHub Actions environment variables:
- Added MODEL_ENDPOINT_0 and MODEL_API_KEY_0 to all test steps
- These are required for app.py initialization
- Set to dummy values (https://test.api) for testing
Test Results:
- Before: 2 failed, 39 passed
- After: 41 passed ✅
All integration tests now pass locally and should pass on GitHub Actions.
- Remove matrix testing against Python 3.10, 3.11, 3.12
- Use Python 3.13 exclusively in both test and lint jobs
- Matches local development environment (Python 3.13.7)
- Ensures consistent behavior between local and CI environments
- Run unit, functional, and integration tests on push/PR
- Test on Python 3.11 with Ubuntu latest
- Include code coverage reporting for unit tests
- Add linting job with black and flake8
- Validate all activity YAML files
- Trigger on main, master, develop, and claude/** branches