[Feature] support in predict for complex types #7775
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: CI PIPELINE | |
on: | |
pull_request_target: | |
types: | |
- opened | |
- synchronize | |
branches: | |
- main | |
concurrency: | |
group: ${{ github.event.number }} | |
cancel-in-progress: true | |
permissions: | |
checks: write | |
actions: write | |
contents: write | |
deployments: write | |
discussions: write | |
issues: write | |
packages: write | |
pages: write | |
pull-requests: write | |
repository-projects: write | |
security-events: write | |
statuses: write | |
jobs: | |
sync-checker: | |
runs-on: ubuntu-latest | |
if: > | |
!contains(github.event.pull_request.title, '(sync #') && | |
!contains(github.event.pull_request.labels.*.name, 'sync') && | |
(!startsWith(github.head_ref, github.base_ref) || !contains(github.head_ref, '-sync-')) | |
name: RUN CHECKER | |
steps: | |
- run: echo "success" | |
- run: | | |
echo "${{ github.event.pull_request.title }}" | |
echo "${{ github.head_ref }}" | |
doc-checker: | |
runs-on: ubuntu-latest | |
needs: sync-checker | |
name: DOC FILTER | |
outputs: | |
output1: ${{ steps.doc-changes-info.outputs.doc }} | |
steps: | |
- uses: dorny/paths-filter@v2 | |
id: changes | |
with: | |
filters: | | |
doc: | |
- 'docs/**' | |
- name: DOC CHECK INFO | |
id: doc-changes-info | |
run: | | |
echo "doc=${{ steps.changes.outputs.doc }}" >> $GITHUB_OUTPUT | |
add-doc-label: | |
needs: doc-checker | |
runs-on: ubuntu-latest | |
name: ADD DOC LABEL | |
if: ${{ needs.doc-checker.outputs.output1 == 'true' }} | |
steps: | |
- name: add document label | |
uses: actions-ecosystem/action-add-labels@v1 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
labels: documentation | |
markdownlint: | |
runs-on: ubuntu-latest | |
needs: add-doc-label | |
env: | |
PR_NUMBER: ${{ github.event.number }} | |
steps: | |
- name: clean | |
run: | | |
rm -rf ${{ github.workspace }} | |
mkdir -p ${{ github.workspace }}/starrocks | |
- name: BRANCH INFO | |
id: branch | |
run: | | |
echo ${{github.base_ref}} | |
echo "branch=${{github.base_ref}}" >> $GITHUB_OUTPUT | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Checkout PR | |
run: | | |
BRANCH=${{steps.branch.outputs.branch}} | |
git config --global user.name "wanpengfei-git" | |
git config --global user.email "[email protected]" | |
git checkout $BRANCH; | |
git pull; | |
BRANCH_NAME="${BRANCH}-${PR_NUMBER}"; | |
git fetch origin pull/${PR_NUMBER}/head:${BRANCH_NAME}; | |
git checkout $BRANCH_NAME; | |
git checkout -b merge_pr; | |
git merge --squash --no-edit ${BRANCH} || (echo "Merge conflict, please check." && exit -1); | |
- uses: articulate/[email protected] | |
with: | |
config: "docs/.markdownlint.yaml" | |
files: 'docs/**/*.md' | |
ignore: node_modules | |
version: 0.28.1 | |
be-checker: | |
runs-on: ubuntu-latest | |
needs: sync-checker | |
name: BE FILTER | |
outputs: | |
output1: ${{ steps.be-changes-info.outputs.be }} | |
output2: ${{ steps.be-changes-info.outputs.thirdparty }} | |
steps: | |
- uses: dorny/paths-filter@v2 | |
id: changes | |
with: | |
filters: | | |
be: | |
- 'be/**' | |
- 'gensrc/**' | |
- 'run-be-ut.sh' | |
- 'build.sh' | |
- 'thirdparty/**' | |
- 'docker/dockerfiles/dev-env/dev-env.Dockerfile' | |
thirdparty: | |
- 'thirdparty/**' | |
- 'docker/dockerfiles/dev-env/dev-env.Dockerfile' | |
- name: BE CHECK INFO | |
id: be-changes-info | |
run: | | |
echo "be=${{ steps.changes.outputs.be }}" >> $GITHUB_OUTPUT | |
echo "thirdparty=${{ steps.changes.outputs.thirdparty }}" >> $GITHUB_OUTPUT | |
clang-format: | |
runs-on: [self-hosted, normal] | |
needs: be-checker | |
name: Clang-Format | |
env: | |
PR_NUMBER: ${{ github.event.number }} | |
if: ${{ needs.be-checker.outputs.output1 == 'true' }} | |
steps: | |
- name: clean | |
run: | | |
rm -rf ${{ github.workspace }} | |
mkdir -p ${{ github.workspace }}/starrocks | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: BRANCH INFO | |
id: branch | |
run: | | |
echo ${{github.base_ref}} | |
echo "branch=${{github.base_ref}}" >> $GITHUB_OUTPUT | |
- name: Checkout PR | |
run: | | |
BRANCH=${{steps.branch.outputs.branch}} | |
git checkout $BRANCH; | |
git pull; | |
BRANCH_NAME="${BRANCH}-${PR_NUMBER}"; | |
git fetch origin pull/${PR_NUMBER}/head:${BRANCH_NAME}; | |
git checkout $BRANCH_NAME; | |
git checkout -b merge_pr; | |
git merge --squash --no-edit ${BRANCH} || (echo "Merge conflict, please check." && exit -1); | |
- name: Run Clang-Format | |
run: | | |
export PATH=/var/lib/llvm/bin:$PATH | |
bash build-support/check-format.sh | |
thirdparty-update: | |
runs-on: [self-hosted, normal] | |
needs: [ be-checker, clang-format ] | |
name: Thirdparty Update | |
env: | |
PR_NUMBER: ${{ github.event.number }} | |
BRANCH: ${{ github.base_ref }} | |
REPO: ${{ github.repository }} | |
outputs: | |
ip: ${{ steps.update-image.outputs.ip }} | |
instance_id: ${{ steps.update-image.outputs.instance_id }} | |
image_cache_id: ${{ steps.update-image.outputs.image_cache_id }} | |
steps: | |
- name: clean | |
run: | | |
rm -rf ${{ github.workspace }} | |
mkdir -p ${{ github.workspace }}/starrocks | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Update Image | |
id: update-image | |
run: | | |
set -ex | |
if [[ "${{ needs.be-checker.outputs.output2 }}" == 'true' ]]; then | |
rm -rf ./elastic-service | |
cp -rf /var/lib/elastic-service ./elastic-service | |
cd elastic-service && git pull | |
./bin/elastic-cluster.sh --template ci-image --run | |
ip=$(grep instances_ips conf/starrocks_deploy.conf | head -n 1 | awk '{print $NF}') | |
instance_id=$(grep instances conf/starrocks_deploy.conf | head -n 1 | awk '{print $NF}') | |
echo "ip=${ip}" >> $GITHUB_OUTPUT | |
echo "instance_id=${instance_id}" >> $GITHUB_OUTPUT | |
sleep 30 | |
sudo ssh-keygen -f "/root/.ssh/known_hosts" -R "${ip}" || true | |
sshpass -p ${{ secrets.PASSWORD }} scp -o StrictHostKeyChecking=no -r bin/elastic-build-thirdparty.sh root@$ip:/home/disk1/ | |
sshpass -p ${{ secrets.PASSWORD }} ssh -o StrictHostKeyChecking=no root@$ip "cd /home/disk1; ./elastic-build-thirdparty.sh $BRANCH $PR_NUMBER" | |
image_cache_id=$(python3 lib/eci_imagecache.py create $BRANCH-$PR_NUMBER) | |
echo "image_cache_id=${image_cache_id}" >> $GITHUB_OUTPUT | |
fi | |
- name: Clean ENV | |
if: always() | |
run: | | |
if [[ "${{ needs.be-checker.outputs.output2 }}" == 'true' ]]; then | |
cd elastic-service | |
./bin/elastic-cluster.sh --delete | |
fi | |
be-ut: | |
runs-on: [self-hosted, normal] | |
needs: [ be-checker, thirdparty-update ] | |
timeout-minutes: 90 | |
name: BE UT | |
env: | |
PR_NUMBER: ${{ github.event.number }} | |
BRANCH: ${{ github.base_ref }} | |
steps: | |
- name: BRANCH INFO | |
id: branch | |
run: | | |
echo ${{github.base_ref}} | |
echo "branch=${{github.base_ref}}" >> $GITHUB_OUTPUT | |
- name: UPDATE ECI & RUN UT | |
id: run_ut | |
shell: bash | |
timeout-minutes: 90 | |
run: | | |
set -ex | |
rm -rf ./elastic-service | |
ln -s /var/lib/elastic-service ./elastic-service | |
cd elastic-service && git pull | |
if [[ "${{ needs.be-checker.outputs.output2 }}" == 'true' ]]; then | |
export image_cache_id=${{ needs.thirdparty-update.outputs.image_cache_id }} | |
export image_tag=$BRANCH-$PR_NUMBER | |
fi | |
./bin/elastic-ut.sh --pr ${PR_NUMBER} --module be --repository ${{ github.repository }} | |
- name: clean ECI | |
if: always() | |
run: | | |
echo ${{ steps.run_ut.outputs.ECI_ID }} | |
eci rm ${{ steps.run_ut.outputs.ECI_ID }} | |
- name: Upload log | |
uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
name: BE UT LOG | |
path: ${{ steps.run_ut.outputs.RES_LOG }} | |
retention-days: 1 | |
- name: Clean ENV | |
if: always() | |
run: | | |
rm -f ${{ steps.run_ut.outputs.RES_FILE }} | |
rm -f ${{ steps.run_ut.outputs.RES_LOG }} | |
clang-tidy: | |
runs-on: [self-hosted, normal] | |
needs: [ be-checker, thirdparty-update ] | |
timeout-minutes: 90 | |
name: Clang-Tidy | |
env: | |
PR_NUMBER: ${{ github.event.number }} | |
BRANCH: ${{ github.base_ref }} | |
steps: | |
- name: clean | |
run: | | |
rm -rf ${{ github.workspace }} | |
mkdir -p ${{ github.workspace }} | |
- name: BRANCH INFO | |
id: branch | |
run: | | |
echo ${{github.base_ref}} | |
echo "branch=${{github.base_ref}}" >> $GITHUB_OUTPUT | |
- name: UPDATE ECI & RUN Clang Tidy | |
id: run_clang_tidy | |
shell: bash | |
timeout-minutes: 60 | |
run: | | |
rm -rf ./elastic-service && ln -s /var/lib/elastic-service ./elastic-service && cd elastic-service && git pull | |
if [[ "${{ needs.be-checker.outputs.output2 }}" == 'true' ]]; then | |
export image_cache_id=${{ needs.thirdparty-update.outputs.image_cache_id }} | |
export image_tag=$BRANCH-$PR_NUMBER | |
fi | |
./bin/elastic-build.sh --pr ${PR_NUMBER} --repository ${{ github.repository }} --be --clang-tidy | |
- name: clean ECI | |
if: always() | |
run: | | |
echo ${{ steps.run_clang_tidy.outputs.ECI_ID }} | |
eci rm ${{ steps.run_clang_tidy.outputs.ECI_ID }} | |
- name: Clean ENV | |
if: always() | |
run: | | |
rm -f ${{ steps.run_clang_tidy.outputs.RES_FILE }} | |
rm -f ${{ steps.run_clang_tidy.outputs.RES_LOG }} | |
fe-checker: | |
runs-on: ubuntu-latest | |
needs: sync-checker | |
name: FE FILTER | |
outputs: | |
output1: ${{ steps.fe-changes-info.outputs.fe }} | |
steps: | |
- uses: dorny/paths-filter@v2 | |
id: changes | |
with: | |
filters: | | |
fe: | |
- 'fe/**' | |
- 'gensrc/**' | |
- 'run-fe-ut.sh' | |
- 'java-extensions/**' | |
- 'build.sh' | |
- 'test/**' | |
- run: echo ${{ steps.changes.outputs.fe }} | |
- name: FE CHECK INFO | |
id: fe-changes-info | |
run: | | |
echo "fe=${{ steps.changes.outputs.fe }}" >> $GITHUB_OUTPUT | |
fe-codestyle-check: | |
runs-on: ubuntu-latest | |
needs: fe-checker | |
if: needs.fe-checker.outputs.output1 == 'true' | |
name: FE Code Style Check | |
env: | |
PR_NUMBER: ${{ github.event.number }} | |
steps: | |
- name: clean | |
run: | | |
rm -rf ${{ github.workspace }} | |
mkdir -p ${{ github.workspace }}/starrocks | |
- uses: dorny/paths-filter@v2 | |
id: java-file | |
name: JAVA FILE | |
with: | |
filters: | | |
java: | |
- '**.java' | |
- run: echo ${{ steps.java-file.outputs.java }} | |
- name: BRANCH INFO | |
id: branch | |
run: | | |
echo ${{github.base_ref}} | |
echo "branch=${{github.base_ref}}" >> $GITHUB_OUTPUT | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Checkout PR | |
run: | | |
BRANCH=${{steps.branch.outputs.branch}} | |
git config --global user.name "wanpengfei-git"; | |
git config --global user.email "[email protected]"; | |
git checkout $BRANCH; | |
git pull; | |
BRANCH_NAME="${BRANCH}-${PR_NUMBER}"; | |
git fetch origin pull/${PR_NUMBER}/head:${BRANCH_NAME}; | |
git checkout $BRANCH_NAME; | |
git checkout -b merge_pr; | |
git merge --squash --no-edit ${BRANCH} || (echo "Merge conflict, please check." && exit -1); | |
- name: Copy checkstyle files | |
if: ${{ steps.java-file.outputs.java == 'true' }} | |
run: | | |
pwd | |
cp fe/checkstyle* . | |
- name: Run java checkstyle | |
if: ${{ steps.java-file.outputs.java == 'true' }} | |
uses: dbelyaev/[email protected] | |
with: | |
workdir: "./fe" | |
checkstyle_config: checkstyle.xml | |
reporter: 'github-pr-check' | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
fail_on_error: true | |
level: error | |
fe-ut: | |
runs-on: [self-hosted, normal] | |
needs: fe-codestyle-check | |
name: FE UT | |
env: | |
PR_NUMBER: ${{ github.event.number }} | |
steps: | |
- name: clean | |
run: | | |
rm -rf ${{ github.workspace }} | |
mkdir -p ${{ github.workspace }}/starrocks | |
- name: BRANCH INFO | |
id: branch | |
run: | | |
echo ${{github.base_ref}} | |
echo "branch=${{github.base_ref}}" >> $GITHUB_OUTPUT | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Checkout PR | |
run: | | |
BRANCH=${{steps.branch.outputs.branch}} | |
git checkout $BRANCH; | |
git pull; | |
BRANCH_NAME="${BRANCH}-${PR_NUMBER}"; | |
git fetch origin pull/${PR_NUMBER}/head:${BRANCH_NAME}; | |
git checkout $BRANCH_NAME; | |
git checkout -b merge_pr; | |
git merge --squash --no-edit ${BRANCH} || (echo "Merge conflict, please check." && exit -1); | |
- name: UPDATE ECI & RUN UT | |
id: run_ut | |
shell: bash | |
timeout-minutes: 60 | |
run: | | |
set -ex | |
rm -rf ./elastic-service | |
ln -s /var/lib/elastic-service ./elastic-service | |
cd elastic-service && git pull | |
./bin/elastic-ut.sh --pr ${PR_NUMBER} --module fe --branch ${{steps.branch.outputs.branch}} --build Release --repository ${{ github.repository }} | |
- name: Clean ECI | |
if: always() | |
run: | | |
echo ${{ steps.run_ut.outputs.ECI_ID }} | |
echo ">>> Dmesg info:" | |
eci exec ${{ steps.run_ut.outputs.ECI_ID }} bash -c "dmesg -T" | |
eci rm ${{ steps.run_ut.outputs.ECI_ID }} | |
- name: Prepare coverage files | |
run: | | |
cd ${{ github.workspace }}/fe/fe-core | |
cp -rf ${{ steps.run_ut.outputs.COV_DIR }} target/ | |
- name: Coverage Report | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: ${{ github.workspace }}/fe/fe-core/target/${{ steps.run_ut.outputs.COV_FILE }} | |
dry_run: false | |
name: fe-ut | |
fail_ci_if_error: false | |
verbose: true | |
- name: Incremental Coverage Report | |
run: | | |
set -ex | |
rm -rf ./coverchecker | |
ln -s /var/local/env/coverchecker ./coverchecker && cd coverchecker && git pull | |
time_count=0 | |
pull_status=1 | |
export JAVA_HOME=/var/local/env/jdk1.8.0_202; | |
export PATH=$JAVA_HOME/bin:$PATH; | |
while (( $pull_status != 0 )); do | |
if (( $time_count == 3 )); then | |
exit 1 | |
fi | |
timeout 180 java -jar cover-checker-console/target/cover-checker-console-1.4.0-jar-with-dependencies.jar \ | |
--cover ${{ github.workspace }}/fe/fe-core/target/result/ --github-token ${{ secrets.PAT }} \ | |
--repo ${{ github.repository }} --threshold 80 --github-url api.github.com --pr ${PR_NUMBER} -type jacoco | |
pull_status=$? | |
time_count=`expr $time_count + 1` | |
done | |
- name: UT Report | |
if: always() | |
uses: mikepenz/action-junit-report@v3 | |
env: | |
github_token: ${{ secrets.PAT }} | |
token: ${{ secrets.PAT }} | |
with: | |
check_name: 'FE UT Report' | |
detailed_summary: true | |
report_paths: ${{ steps.run_ut.outputs.FE_REPORT_DIR }}/*.xml | |
- name: Upload log | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: FE UT LOG | |
path: ${{ steps.run_ut.outputs.RES_LOG }} | |
retention-days: 1 | |
- name: Clean ENV | |
if: always() | |
run: | | |
rm -rf ${{ steps.run_ut.outputs.FE_REPORT_DIR }} | |
rm -f ${{ steps.run_ut.outputs.RES_FILE }} | |
rm -f ${{ steps.run_ut.outputs.RES_LOG }} | |
rm -rf ${{ steps.run_ut.outputs.COV_DIR }} | |
build: | |
runs-on: [self-hosted, normal] | |
needs: [be-checker, fe-checker, be-ut, fe-ut, thirdparty-update] | |
name: BUILD | |
env: | |
PR_NUMBER: ${{ github.event.number }} | |
BRANCH: ${{ github.base_ref }} | |
outputs: | |
build_output_tar: ${{ steps.run_build.outputs.OUTPUT_TAR }} | |
base_version: ${{ steps.run_build.outputs.BASE_VERSION }} | |
if: always() && (needs.be-ut.result == 'success' && needs.fe-ut.result == 'success') || (needs.be-checker.outputs.output1 != 'true' && needs.fe-ut.result == 'success') || (needs.fe-checker.outputs.output1 != 'true' && needs.be-ut.result == 'success') | |
steps: | |
- name: Clean Workspace | |
uses: AutoModality/[email protected] | |
- name: BRANCH INFO | |
id: branch | |
run: | | |
echo ${{github.base_ref}} | |
echo "branch=${{github.base_ref}}" >> $GITHUB_OUTPUT | |
- name: UPDATE ECI & RUN BUILD | |
id: run_build | |
shell: bash | |
timeout-minutes: 90 | |
run: | | |
rm -rf ./elastic-service | |
ln -s /var/lib/elastic-service ./elastic-service | |
cd elastic-service && git pull | |
if [[ "${{ needs.be-checker.outputs.output2 }}" == 'true' ]]; then | |
export image_cache_id=${{ needs.thirdparty-update.outputs.image_cache_id }} | |
export image_tag=$BRANCH-$PR_NUMBER | |
fi | |
./bin/elastic-build.sh --pr ${PR_NUMBER} --repository ${{ github.repository }} | |
- name: build result | |
run: | | |
echo ${{ steps.run_build.outputs.OUTPUT_TAR }} | |
- name: clean ECI | |
if: always() | |
run: | | |
echo ${{ steps.run_build.outputs.ECI_ID }} | |
eci rm ${{ steps.run_build.outputs.ECI_ID }} | |
- name: Clean ENV | |
if: always() | |
run: | | |
rm -f ${{ steps.run_build.outputs.RES_FILE }} | |
rm -f ${{ steps.run_build.outputs.RES_LOG }} | |
deploy: | |
runs-on: [self-hosted, normal] | |
if: always() && needs.build.result == 'success' | |
needs: build | |
name: DEPLOY SR | |
env: | |
PR_NUMBER: ${{ github.event.number }} | |
CLUSTER_NAME: ci-admit | |
outputs: | |
fe: ${{steps.deploy_sr.outputs.fe}} | |
be: ${{steps.deploy_sr.outputs.be}} | |
deploy_conf_file: ${{steps.apply_resource.outputs.deploy_conf_file}} | |
steps: | |
- name: Clean Workspace | |
uses: AutoModality/[email protected] | |
- name: BRANCH INFO | |
id: branch | |
run: | | |
echo ${{github.base_ref}} | |
echo "branch=${{github.base_ref}}" >> $GITHUB_OUTPUT | |
- name: Apply for resources | |
id: apply_resource | |
run: | | |
set -x | |
rm -rf ./elastic-service | |
cp -rf /var/lib/elastic-service ./elastic-service | |
cd elastic-service && git pull | |
./bin/elastic-cluster.sh --template ci-admit | |
cp conf/starrocks_deploy.conf /var/local/env/${PR_NUMBER}-starrocks_deploy.conf | |
echo "deploy_conf_file=/var/local/env/${PR_NUMBER}-starrocks_deploy.conf" >> $GITHUB_OUTPUT | |
- name: Deploy SR | |
id: deploy_sr | |
run: | | |
set -x | |
cd elastic-service | |
repo="${{ github.repository }}" | |
bucket_prefix=`echo ${repo%/*} | tr '[:upper:]' '[:lower:]'` | |
./bin/deploy-cluster.sh -c ${CLUSTER_NAME} --output oss://${bucket_prefix}-ci-release/${{steps.branch.outputs.branch}}/Release/pr/${{needs.build.outputs.build_output_tar}} | |
- run: | | |
echo "FE: ${{steps.deploy_sr.outputs.fe}}, BE: ${{steps.deploy_sr.outputs.be}}" | |
SQL-Tester: | |
runs-on: [self-hosted, normal] | |
name: SQL-Tester | |
needs: [ build, deploy ] | |
if: always() && needs.deploy.result == 'success' | |
timeout-minutes: 30 | |
env: | |
PR_NUMBER: ${{ github.event.number }} | |
CLUSTER_NAME: ci-admit | |
FE_NODE: ${{ needs.deploy.outputs.fe }} | |
BE_NODE: ${{ needs.deploy.outputs.be }} | |
BASE_VERSION: ${{needs.build.outputs.base_version}} | |
steps: | |
- name: clean | |
run: | | |
rm -rf ${{ github.workspace }} | |
mkdir -p ${{ github.workspace }}/starrocks | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: BRANCH INFO | |
id: branch | |
run: | | |
echo ${{github.base_ref}} | |
echo "branch=${{github.base_ref}}" >> $GITHUB_OUTPUT | |
- name: Checkout PR | |
run: | | |
BRANCH=${{steps.branch.outputs.branch}} | |
git checkout $BRANCH; | |
git reset ${BASE_VERSION} --hard || true; | |
BRANCH_NAME="${BRANCH}-${PR_NUMBER}"; | |
git fetch origin pull/${PR_NUMBER}/head:${BRANCH_NAME}; | |
git checkout $BRANCH_NAME; | |
git checkout -b merge_pr; | |
git merge --squash --no-edit ${BRANCH} || (echo "Merge conflict, please check." && exit -1); | |
- name: Prepare Tools | |
run: | | |
cd ${{ github.workspace }} | |
rm -rf .actions | |
mkdir -p .actions/nose-report-action | |
cd .actions/nose-report-action | |
git clone https://github.com/StarRocks/action-junit-report.git . | |
- name: Run Case (${{ needs.deploy.outputs.fe }}) | |
run: | | |
cd ${{ github.workspace }} | |
rm -rf ./elastic-service | |
ln -s /var/lib/elastic-service ./elastic-service | |
cd elastic-service && git pull | |
./bin/run-sql-tester.sh | |
- name: UT Reports | |
uses: ./.actions/nose-report-action | |
if: success() || failure() | |
with: | |
check_name: 'SQL-Tester Results' | |
fail_on_failure: true | |
detailed_summary: true | |
token: ${{ secrets.GITHUB_TOKEN }} | |
report_paths: 'test/*.xml' | |
admit: | |
runs-on: [self-hosted, normal] | |
name: ADMIT TEST | |
needs: [ deploy, SQL-Tester ] | |
if: always() && needs.deploy.result == 'success' && needs.SQL-Tester.result == 'success' | |
timeout-minutes: 40 | |
env: | |
PR_NUMBER: ${{ github.event.number }} | |
CLUSTER_NAME: ci-admit | |
FE_NODE: ${{ needs.deploy.outputs.fe }} | |
BE_NODE: ${{ needs.deploy.outputs.be }} | |
steps: | |
- name: Clean Workspace | |
uses: AutoModality/[email protected] | |
- name: Prepare Tools | |
run: | | |
cd ${{ github.workspace }} | |
rm -rf .actions | |
mkdir -p .actions/nose-report-action | |
cd .actions/nose-report-action | |
git clone https://github.com/StarRocks/action-junit-report.git . | |
- name: Run Case | |
run: | | |
set -x | |
echo "FE: ${{needs.deploy.outputs.fe}}, BE: ${{needs.deploy.outputs.be}}" | |
cd ${{ github.workspace }} | |
rm -rf ./elastic-service | |
ln -s /var/lib/elastic-service ./elastic-service | |
cd elastic-service && git pull | |
cd ${{ github.workspace }} | |
rm -rf ./StarRocksTest && cp -rf /var/lib/StarRocksTest ./StarRocksTest | |
cd ./StarRocksTest && git pull | |
cd ${{ github.workspace }}/elastic-service | |
./bin/run-admit.sh | |
- name: Publish Test Results | |
uses: ./.actions/nose-report-action | |
if: success() || failure() | |
with: | |
check_name: 'Admit Test Results' | |
fail_on_failure: true | |
detailed_summary: true | |
token: ${{ secrets.GITHUB_TOKEN }} | |
report_paths: 'StarRocksTest/result/*.xml' | |
Teardown: | |
runs-on: [self-hosted, normal] | |
name: Teardown | |
needs: [ deploy, admit ] | |
if: always() && needs.deploy.outputs.deploy_conf_file != '' | |
env: | |
PR_NUMBER: ${{ github.event.number }} | |
BRANCH: ${{ github.base_ref }} | |
CONF_FILE: ${{ needs.deploy.outputs.deploy_conf_file }} | |
steps: | |
- name: Backup SR Info | |
run: | | |
rm -rf ./elastic-service | |
cp -rf /var/lib/elastic-service ./elastic-service | |
cd elastic-service && git pull | |
./bin/backup_log_cores.sh --branch $BRANCH --pr $PR_NUMBER --build Release --conf $CONF_FILE --repository ${{ github.repository }} | |
- name: Clean ECS | |
run: | | |
cd elastic-service | |
./bin/elastic-cluster.sh --delete | |
- name: Clean TMP | |
run: | | |
rm -f $CONF_FILE |