-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: husharp <[email protected]>
- Loading branch information
Showing
24 changed files
with
986 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: PD Real TiUP Test | ||
on: | ||
push: | ||
branches: | ||
- master | ||
- release-* | ||
pull_request: | ||
branches: | ||
- master | ||
- release-* | ||
concurrency: | ||
group: ${{ github.ref }}-${{ github.workflow }} | ||
cancel-in-progress: true | ||
jobs: | ||
real-cluster: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: '1.21' | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
- name: Restore cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/go/pkg/mod | ||
~/.cache/go-build | ||
**/.tools | ||
**/.dashboard_download_cache | ||
key: ${{ runner.os }}-go-${{ matrix.worker_id }}-${{ hashFiles('**/go.sum') }} | ||
|
||
- name: Test | ||
run: make check | ||
working-directory: tests/integrations/realtiup |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# Copyright 2023 TiKV Project Authors. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
ROOT_PATH := ../../.. | ||
GO_TOOLS_BIN_PATH := $(ROOT_PATH)/.tools/bin | ||
PATH := $(GO_TOOLS_BIN_PATH):$(PATH) | ||
SHELL := env PATH='$(PATH)' GOBIN='$(GO_TOOLS_BIN_PATH)' $(shell which bash) | ||
|
||
check: static deploy test clean | ||
|
||
static: install-tools | ||
@ echo "gofmt ..." | ||
@ gofmt -s -l -d . 2>&1 | awk '{ print } END { if (NR > 0) { exit 1 } }' | ||
@ echo "golangci-lint ..." | ||
@ golangci-lint run -c $(ROOT_PATH)/.golangci.yml --verbose ./... --allow-parallel-runners | ||
@ echo "revive ..." | ||
@ revive -formatter friendly -config $(ROOT_PATH)/revive.toml ./... | ||
|
||
tidy: | ||
@ go mod tidy | ||
git diff go.mod go.sum | cat | ||
git diff --quiet go.mod go.sum | ||
|
||
deploy: clean | ||
@ echo "deploying..." | ||
./deploy.sh | ||
@ echo "wait tiup cluster ready..." | ||
./wait_tiup.sh 15 20 | ||
@ echo "check cluster status..." | ||
@ pid=$$(ps -ef | grep 'tiup' | grep -v grep | awk '{print $$2}' | head -n 1); \ | ||
echo $$pid; | ||
|
||
test: | ||
CGO_ENABLED=1 go test ./... -v -tags deadlock -race -cover || { exit 1; } | ||
|
||
clean: | ||
@ pid=$$(ps -ef | grep 'tiup' | grep -v grep | awk '{print $$2}' | head -n 1); \ | ||
if [ ! -z "$$pid" ]; then \ | ||
echo $$pid; \ | ||
kill $$pid; \ | ||
fi | ||
@ rm -rf playground.log | ||
|
||
install-tools: | ||
cd $(ROOT_PATH) && $(MAKE) install-tools |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
# deploy `tiup playground` | ||
|
||
make clean | ||
cd ../../../ | ||
rm -rf bin | ||
RUN_CI=1 make pd-server-basic | ||
|
||
|
||
# Install TiUP | ||
echo "install binaries" | ||
|
||
|
||
|
||
# Run TiUP | ||
$TIUP_BIN_DIR playground nightly --kv 3 --tiflash 0 --db 1 --pd 3 --without-monitor --pd.binpath ./bin/pd-server --tag pd_test > ./tests/integrations/realtiup/playground.log 2>&1 & |
Oops, something went wrong.