-
Notifications
You must be signed in to change notification settings - Fork 25
ci: automate unit testing for pull requests #147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
569d262 to
e19ac56
Compare
Update file dir Active virtual env Fix dir name Add ls for debugging Change dir navigation Update pythonpath Use make test Fix some of unit test failures Add yield to mock Fix two more tests Fix two more tests Fix last test
408a338 to
f7d0ee1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements automated unit testing for pull requests and fixes multiple failing unit tests to enable the CI workflow.
Key changes include:
- Added GitHub Actions workflow for automated unit testing on PRs
- Fixed test data structure mismatches (attribute name corrections)
- Updated test mocking strategies to properly handle async operations
- Added missing imports and adjusted test fixtures
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/run-unit-tests.yml |
New GitHub Actions workflow to run unit tests on pull requests |
tests/test_background_task.py |
Added event loop yields after task stop to ensure proper test timing |
tests/services/test_inference_result_parser.py |
Fixed attribute names from text/content to texts/contents |
tests/services/records_manager/test_streaming_post_processor.py |
Updated test setup with proper factory registration and async task handling |
tests/services/records_manager/test_processing_stats_streamer.py |
Added async mocking for pub_client to prevent test failures |
tests/logging/test_logging_mixins.py |
Fixed logger level setting for proper lazy evaluation testing |
tests/data_exporters/test_json_exporter.py |
Updated test to match expected JSON structure with records wrapper |
tests/data_exporters/test_exporter_manager.py |
Enhanced mocking to handle multiple exporters with proper async assertions |
tests/config/test_base_config.py |
Changed import from Pydantic BaseModel to AIPerfBaseModel |
aiperf/common/config/user_config.py |
Fixed syntax error in field annotation |
tests/services/records_manager/test_streaming_post_processor.py
Outdated
Show resolved
Hide resolved
tests/services/records_manager/test_streaming_post_processor.py
Outdated
Show resolved
Hide resolved
lkomali
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Run automated unit testing on pull requests. This PR fixes currently failing unit tests.