rooch-network/rooch

[CI] accelerate CI workflow

Opened this issue · 0 comments

Description:

The current GitHub Actions CI workflow is performing unnecessary checks and tests, leading to inefficiencies in code merging. The main problem is that any modification, regardless of its nature, triggers the full suite of tests. This significantly slows down the development process.

Objective:

To find a method that allows the CI workflow to run only the tests that are relevant to the changes made.
For example, if the modification is limited to markdown documentation, only the markdown syntax checks should be run.

Current Problems:

Full suite of tests run for every single change, even for non-code modifications.
This results in longer waiting times for CI completion and decreases overall merging efficiency.

Proposed Solution:

Implement a mechanism to detect the type of changes made and run the corresponding tests.

For example:
If only markdown files are modified, run only markdown syntax checks.
If code files are modified, run the relevant unit and integration tests.

Benefits:

Reduce CI runtime, leading to faster feedback and quicker merges.
Optimize resource usage by avoiding unnecessary test executions.
Improve developer productivity by reducing the waiting time for CI results.

Steps to Achieve:

Change Detection:

Implement a script or use an existing tool to detect the types of files changed in a pull request.

Conditional Execution:

Modify the GitHub Actions workflow to conditionally run jobs based on the detected changes.

Testing and Validation:

Test the new workflow to ensure it accurately detects changes and runs the appropriate tests.
Validate that all critical tests are still executed when relevant changes are made.

Additional Notes:

Ensure that this optimization does not compromise the thoroughness of the CI checks.
Consider edge cases where changes in certain files may require a broader set of tests.
By implementing these changes, we aim to significantly improve the efficiency of our CI workflow, making the development process smoother and faster.