-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
choreMaintenance tasks (dependencies, configs, CI/CD)Maintenance tasks (dependencies, configs, CI/CD)maintenanceGeneral maintenance and housekeepingGeneral maintenance and housekeeping
Description
Summary
Refactor the CI/CD pipeline to use pytest's automatic test discovery, ensuring all tests are executed without manual configuration.
Description
The "Run tests" step in our .github/workflows/ci.yml workflow currently specifies explicit, hardcoded paths for test directories. This manual approach has several drawbacks:
- Incomplete Coverage: There is a risk that not all test suites are being executed, as new tests might be added without updating the CI file.
- Maintenance Overhead: Whenever a new plugin with tests is added, the
ci.ymlfile must be manually updated. Forgetting this step results in the new plugin's tests not being run in the pipeline. - Scalability Issues: As the number of plugins grows, the list of test paths will become long and difficult to manage.
To resolve this, the workflow should be modified to use pytest's automatic test discovery feature. By running poetry run pytest from the project root, pytest will automatically scan all directories for test files (e.g., test_*.py), ensuring all tests are reliably and automatically executed.
Objectives
- Improve CI reliability by ensuring all tests are automatically discovered and executed.
- Reduce maintenance overhead by eliminating the need to manually update test paths for new plugins.
- Simplify the CI workflow configuration for test execution.
Category
CI/CD configuration
Tasks
- Modify the
ci.ymlworkflow to replace the multi-line test commands with a single command that leveragespytest's auto-discovery. - Confirm that a CI run successfully discovers and executes tests from the main
tests/directory and all plugin subdirectories. - Ensure the solution is scalable and automatically includes tests from any new plugins without requiring further changes to
ci.yml.
Considerations (Optional)
N/A
Configuration Changes (Optional)
The following change should be made to .github/workflows/ci.yml:
# .github/workflows/ci.yml
- name: Run tests
- run: |
- poetry run pytest tests/ plugins/titan-plugin-git/tests/
- poetry run pytest plugins/titan-plugin-jira/tests/
+ name: Run tests
+ run: poetry run pytest
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
choreMaintenance tasks (dependencies, configs, CI/CD)Maintenance tasks (dependencies, configs, CI/CD)maintenanceGeneral maintenance and housekeepingGeneral maintenance and housekeeping