-
Notifications
You must be signed in to change notification settings - Fork 288
Description
Description
To ensure continuous reliability between our Subtensor and the Bittensor package, we need to implement a comprehensive GitHub Actions workflow. This workflow will automate the entire testing process, from building the blockchain node using the localnet.sh script, to installing the Bittensor package from a configurable branch, and finally running the test_subtensor_integration.py integration test.
The primary objective of this setup is to verify that any changes introduced to the subtensor codebase do not break or introduce regressions in the Bittensor Python code. By parameterizing the Bittensor repository branch, we can test against various development stages and release candidates, ensuring compatibility and robustness across different versions.
Acceptance Criteria
- The GitHub Actions workflow should accept the Bittensor repository branch as a configurable input parameter.
- The workflow should trigger automatically on push or pull request events to specified branches, with an option for manual triggers.
- It should build the latest version of our blockchain node using the
localnet.shscript. - The Bittensor package should be fetched and installed from the specified branch of the GitHub repository.
- The
test_subtensor_integration.pyintegration test should be executed after successful installation of the Bittensor package. - Test results, including any failures or errors, should be prominently reported within the GitHub Actions workflow.
- The workflow should gracefully handle and report any errors encountered during the build, installation, or testing process.
Tasks
- Design and implement a GitHub Actions workflow file in the
.github/workflowsdirectory.- Define a workflow trigger based on push or pull request events to specified branches.
- Include an option for manual workflow triggers.
- Add an input parameter for specifying the Bittensor repository branch.
- Integrate the
localnet.shscript into the workflow for building and starting the blockchain nodes.- Ensure the script is executed with the appropriate parameters and environment variables.
- Handle any errors or failures during the node build and startup process.
- Implement steps to fetch and install the Bittensor package from the specified branch.
- Use the input parameter to dynamically set the branch for Bittensor package installation.
- Handle any dependencies or setup required for the Bittensor package.
- Configure the environment and execute the
test_subtensor_integration.pyintegration test.- Set up any necessary environment variables or configurations for the test.
- Run the integration test and capture the test results.
- Implement comprehensive error handling and reporting throughout the workflow.
- Catch and handle any errors or exceptions that may occur during each step.
- Provide clear and informative error messages in the workflow logs.
- Optimize the workflow for performance and efficiency.
- Implement caching mechanisms for dependencies and build artifacts.
- Parallelize independent tasks wherever possible.
- Optional: Implement notifications or integrate with monitoring tools for test failures or critical issues.
Additional Considerations
- Utilize Docker containers within the GitHub Actions workflow to provide a consistent and isolated environment for building, installing, and testing.
- Implement a matrix strategy to test against multiple versions or configurations of the Bittensor package and subtensor node.
- Consider integrating code coverage reporting to monitor and maintain high test coverage.
- Explore opportunities for performance optimization, such as parallel test execution or selective test runs based on changed files.
Related Links
- Bittensor Repository: Bittensor GitHub
- Integration Test File: test_subtensor_integration.py
- GitHub Actions Documentation: GitHub Actions
- Localnet Script: localnet.sh