feat: add wescale wesql cluster workflow #41
Workflow file for this run
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
name: "Ubuntu Docker Cluster" | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened] | |
jobs: | |
setup: | |
name: "Ubuntu Docker Cluster" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: 1.20.1 | |
- name: Compile source | |
timeout-minutes: 30 | |
run: | | |
# install etcd | |
BUILD_CHROME=0 BUILD_JAVA=0 BUILD_CONSUL=0 BUILD_K3S=0 BUILD_ETCD=1 ./bootstrap.sh | |
make failpoint-enable | |
make build | |
make failpoint-disable | |
- name: Start MySQL-Server & WeScale | |
run: | | |
export PATH=$PATH:$(pwd)/bin | |
cd ./examples/wesql-server | |
./start_mysql_server.sh | |
./init_single_node_cluster.sh 2>&1 | tee init_script_logs.txt & | |
- name: Checkout mysql-tester code | |
uses: actions/checkout@v3 | |
with: | |
repository: apecloud/mysql-tester | |
path: './mysql-tester' | |
- name: Build mysql-tester | |
run: | | |
cd ./mysql-tester && \ | |
mkdir bin && \ | |
make build | |
- name: Run MTR Tests | |
run: | | |
cd ./mysql-tester && \ | |
eatmydata -- ./bin/mysql-tester -user root -port 15306 -path testcase/wesql-scale 2>&1 | tee -a output.txt | |
- name: Print WeScale Logs | |
run: | | |
docker logs mysql-server | |
cat ./examples/wesql-server/init_script_logs.txt | |
- name: Print test output | |
run: | | |
# print test output | |
cat ./mysql-tester/output.txt | |
- name: Check test results | |
run: | | |
# check if any test failed | |
if grep -q -- 'level=error' ./mysql-tester/output.txt; then | |
echo "Testcase is failed" | |
exit 1 | |
else | |
echo "Testcase is successful" | |
fi |