Thanks everyone for contributing to Service-Center.
This document explains the process and best practices for submitting a Pull Request to the Service-Center project. This document can be treated as a reference for all contributors and be useful to new and infrequent submitters.
Clone the repo in a proper GOPATH
git clone https://github.com/ServiceComb/service-center.git $GOPATH/src/github.com/ServiceComb/service-center cd $GOPATH/src/github.com/ServiceComb/service-center
We use gvt for dependency management, please follow the below steps for downloading all the dependencies required for building this project.
go get github.com/FiloSottile/gvt gvt restore
If this is a bug or a small fix then you can directly make the changes and ensure all the steps in this documentation and raise a PR, but If it is a feature or a big design or architecture change then we recommend you to raise an issue here or discuss the same in our mailing list.
Once you are done with your changes then please follow the below checks to ensure the code quality before raising a PR.
go fmt ./... go build -o service-center
Running UT in local env, this step assumes you have a docker running in your env.
bash -x scripts/ut_test_in_docker.sh
Once UT has passed you can run the integration test to ensure the overall functionality is not altered.
bash -x scripts/integration_test.sh
Once you are done with compiling, UT and IT then you are good to go for raising the PR, please follow these guidelines for raising the PR.