-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Supports CI on Centos #1747
Supports CI on Centos #1747
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -76,22 +76,23 @@ jobs: | |
# You can convert this to a matrix build if you need cross-platform coverage. | ||
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix | ||
runs-on: ubuntu-latest | ||
container: | ||
image: centos:7 | ||
container: docker.io/centos:7 | ||
|
||
steps: | ||
- name: Install deps | ||
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. | ||
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type | ||
run: | | ||
yum install -y wget git autoconf centos-release-scl | ||
yum install -y wget git autoconf centos-release-scl gcc automake make | ||
yum install -y devtoolset-10-gcc devtoolset-10-gcc-c++ devtoolset-10-make devtoolset-10-bin-util | ||
yum install -y llvm-toolset-7 | ||
yum install -y llvm-toolset-7-clang | ||
source /opt/rh/devtoolset-10/enable | ||
gcc --version | ||
make --version | ||
|
||
yum install -y python3 | ||
python3 --version | ||
python3 -m pip install redis | ||
|
||
- name: Install cmake | ||
run: | | ||
|
@@ -129,3 +130,24 @@ jobs: | |
source /opt/rh/devtoolset-10/enable | ||
ctest -C ${{env.BUILD_TYPE}} | ||
|
||
- name: Unit Test | ||
working-directory: ${{github.workspace}} | ||
run: | | ||
cd ${{github.workspace}} | ||
chmod +x ./pikatests.sh all | ||
./pikatests.sh all | ||
|
||
# master on port 9221, slave on port 9231, all with 2 db | ||
- name: Start pika master and slave | ||
working-directory: ${{github.workspace}}/build | ||
run: | | ||
cd ${{github.workspace}}/build | ||
chmod +x ../tests/integration/start_master_and_slave.sh | ||
../tests/integration/start_master_and_slave.sh | ||
|
||
- name: Run Python E2E Tests | ||
working-directory: ${{github.workspace}}/build | ||
run: | | ||
cd ${{github.workspace}}/build | ||
python3 ../tests/integration/pika_replication_test.py | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The code patch appears to be a GitHub Actions workflow that builds, tests, and runs integration tests for a project. Here are some suggestions for improvement and potential bug risks:
Remember to thoroughly test the workflow, ensuring that all required scripts and files exist in their expected locations, and monitor for any error messages during execution. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Overall, the additional changes include adding There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Code review comments:
Bug risk and improvements:
These suggestions should help you improve the code review. Remember to adapt them to your specific project's requirements and best practices. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Based on the provided code patch, here is a brief code review:
Other than those points, the code patch appears to be functional. It sets up the necessary dependencies and executes different steps for building, testing, and running the application. However, without further context about the project or specific requirements, it's challenging to provide more detailed improvement suggestions. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here's a brief code review of the provided patch:
Improvement Suggestions:
Please note that a comprehensive code review requires a deeper understanding of the project and its requirements. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Overall, the code patch seems fine, but here are a few suggestions for improvement:
Remember to thoroughly test the workflow after making any changes to ensure everything works correctly. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Overall, here are some observations and suggestions for your code:
Reviewing the provided code patch, these would be the main improvements and suggestions. Of course, it heavily depends on the specific requirements and functionalities you're aiming to achieve with this code. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The code review of the provided code patch is as follows:
Overall, the code patch appears to be well-structured and follows the standard approach of installing dependencies, building the project, and running tests. However, it's essential to ensure that the specific dependencies, paths, and scripts being used are valid and suitable for your project. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here are some observations and suggestions for your code patch:
Overall, the code patch seems fine with the given information. Ensure that the paths and dependencies are correctly configured, and thoroughly test the workflow to catch any potential bugs or issues. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Overall, the code patch looks fine with a few potential improvements and bug risks to consider:
Remember to thoroughly test the workflow after making any changes to ensure it functions as expected. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Overall, the code patch seems fine with a few improvement suggestions:
Remember, these are general suggestions, and the applicability may depend on specific requirements and constraints. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here are some suggestions and potential improvements for your code:
Remember to test the workflow thoroughly and iterate on it based on feedback and requirements specific to your project. |
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.
Here are some observations and improvements for the code patch:
In the
build_on_ubuntu
job, it is recommended to use theruns-on: ubuntu-latest
declaration instead ofcontainer: docker.io/centos:7
, as the latter specifies a CentOS container while the job name suggests an Ubuntu environment. Confirm that you want to use Ubuntu or adjust the configuration accordingly.There is a missing step to checkout the repository in the
build_on_centos
job. Add a step that usesactions/checkout@v2
before the "Install deps" step. This will ensure that the repository is available inside the container.In the "Install deps" step of the
build_on_centos
job, additional dependencies are being installed. Make sure these dependencies are necessary for your project. If they are not required, you can remove those lines from the script.The installation of Python 3 and Redis in the
build_on_centos
job seems unrelated to the build process. Verify if these installations are necessary or if they can be moved to a different job or step.Consider adding comments to explain the purpose of each step in the workflow to improve readability and maintainability.
In the "Unit Test" step, make sure that the script
pikatests.sh
exists and is expected to be in the root directory of the project. Otherwise, adjust the path accordingly.The "Start pika master and slave" and "Run Python E2E Tests" steps assume specific locations for the scripts/files being executed. Verify that the paths are correct based on your project's structure.
Overall, it's important to thoroughly test the workflow after implementing these changes to ensure it runs smoothly and meets your requirements.