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.yml file 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
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
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.ymlworkflow currently specifies explicit, hardcoded paths for test directories. This manual approach has several drawbacks:ci.ymlfile must be manually updated. Forgetting this step results in the new plugin's tests not being run in the pipeline.To resolve this, the workflow should be modified to use
pytest's automatic test discovery feature. By runningpoetry run pytestfrom the project root,pytestwill automatically scan all directories for test files (e.g.,test_*.py), ensuring all tests are reliably and automatically executed.Objectives
Category
CI/CD configuration
Tasks
ci.ymlworkflow to replace the multi-line test commands with a single command that leveragespytest's auto-discovery.tests/directory and all plugin subdirectories.ci.yml.Considerations (Optional)
N/A
Configuration Changes (Optional)
The following change should be made to
.github/workflows/ci.yml: