diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fd887e6..d049e4f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,14 +22,11 @@ jobs: with: go-version: ${{env.GO_VERSION}} - - name: Check format - run: | - output="$(gofmt -l .)" - if [ ${#output} -gt 0 ]; then - echo "gofmt fail" - exit 1 - fi - shell: bash + - name: Format code + uses: iamnotaturtle/auto-gofmt@v2.1.0 + with: + # This part is also where you can pass other options, for example: + only_changed: True lint: name: Lint Check @@ -43,9 +40,6 @@ jobs: with: go-version: ${{env.GO_VERSION}} - - name: Generate API - uses: ./.github/workflows/protobuf - - name: golangci-lint uses: golangci/golangci-lint-action@v3 with: @@ -64,9 +58,6 @@ jobs: with: go-version: ${{env.GO_VERSION}} - - name: Generate API - uses: ./.github/workflows/protobuf - - name: Start the cluster run: ./scripts/quick_start.sh diff --git a/.github/workflows/protobuf/action.yaml b/.github/workflows/protobuf/action.yaml deleted file mode 100644 index c1ac32c..0000000 --- a/.github/workflows/protobuf/action.yaml +++ /dev/null @@ -1,25 +0,0 @@ -name: Generate API - -runs: - using: "composite" - steps: - - name: Install proto buf - run: sudo apt install -y protobuf-compiler - shell: bash - - name: Install Go protobuf plugins - run: go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.28 - shell: bash - - name: Install Go gRPC plugins - run: go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.2 - shell: bash - - - name: Initialize Git Submodules - run: git submodule init - shell: bash - - name: Update Git Submodules - run: git submodule update - shell: bash - - - name: Generate api - run: make - shell: bash diff --git a/.gitmodules b/.gitmodules index f3f86b8..38d86b2 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,3 +4,6 @@ [submodule "api/proto/xline-proto"] path = api/proto/xline-proto url = git@github.com:xline-kv/xline-proto.git +[submodule "mock-xline"] + path = mock-xline + url = https://github.com/xline-kv/mock-xline.git diff --git a/scripts/quick_start.sh b/scripts/quick_start.sh index dea5e6d..fb42b89 100755 --- a/scripts/quick_start.sh +++ b/scripts/quick_start.sh @@ -55,7 +55,7 @@ stop_all() { run_container() { echo container starting size=${1} - image="ghcr.io/xline-kv/xline:v0.6.0" + image="ghcr.io/xline-kv/xline:v0.6.1" for ((i = 1; i <= ${size}; i++)); do docker run -d -it --rm --name=node${i} --net=xline_net --ip=${SERVERS[$i]} --cap-add=NET_ADMIN --cpu-shares=1024 -m=512M -v ${DIR}:/mnt ${image} bash & done