[Tool] FE Total Coverage (#27303)
Signed-off-by: AndyZiYe <yeziyu@starrocks.com>
This commit is contained in:
parent
a5c4b014ab
commit
27e4d827ac
|
|
@ -32,12 +32,19 @@ jobs:
|
|||
PR_NUMBER: ${{ github.event.number }}
|
||||
run: |
|
||||
echo $PR_NUMBER > pr_num.txt
|
||||
echo ${{ github.sha }} > head_sha.txt
|
||||
- name: Upload the PR number
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: pr_num
|
||||
path: ./pr_num.txt
|
||||
retention-days: 1
|
||||
- name: Upload the PR HEAD REF
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: head_sha
|
||||
path: ./head_sha.txt
|
||||
retention-days: 1
|
||||
|
||||
doc-checker:
|
||||
runs-on: ubuntu-latest
|
||||
|
|
@ -406,9 +413,79 @@ jobs:
|
|||
fail_on_error: true
|
||||
level: error
|
||||
|
||||
sonarcloud-fe-checker:
|
||||
runs-on: ubuntu-latest
|
||||
needs: fe-checker
|
||||
if: needs.fe-checker.outputs.output1 == 'true'
|
||||
name: FE Sonarcloud Check
|
||||
env:
|
||||
PR_NUMBER: ${{ github.event.number }}
|
||||
steps:
|
||||
- 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 config --global user.name "wanpengfei-git";
|
||||
git config --global user.email "wanpengfei91@163.com";
|
||||
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: Set up JDK 11
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
java-version: 11
|
||||
distribution: 'adopt'
|
||||
|
||||
- name: Cache SonarCloud packages
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ~/.sonar/cache
|
||||
key: ${{ runner.os }}-sonar
|
||||
restore-keys: ${{ runner.os }}-sonar
|
||||
|
||||
- name: Cache Maven packages
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ~/.m2
|
||||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
|
||||
restore-keys: ${{ runner.os }}-maven
|
||||
|
||||
- name: Setup thrift
|
||||
uses: dodopizza/setup-thrift@v1
|
||||
with:
|
||||
version: 0.13.0
|
||||
|
||||
- name: Analyze FE
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
|
||||
SONAR_TOKEN: f0fb4d25c03bae90c2e994c45c29c49dc86fc169 # ${{ secrets.SONAR_TOKEN }}
|
||||
run: |
|
||||
thrift --version
|
||||
whereis thrift
|
||||
export STARROCKS_HOME=${{ github.workspace }}
|
||||
source env.sh
|
||||
mkdir -p thirdparty/installed/bin/
|
||||
cd thirdparty/installed/bin/ && ln -s /usr/local/bin/thrift thrift
|
||||
cd ${{ github.workspace }}/fe
|
||||
mvn -B -DskipTests verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=StarRocks_starrocks -Dsonar.pullrequest.key=${{ github.event.number }} -Dsonar.pullrequest.base=${{ github.base_ref }} -Dsonar.pullrequest.branch=${{ github.head_ref }}
|
||||
|
||||
fe-ut:
|
||||
runs-on: [self-hosted, normal]
|
||||
needs: fe-codestyle-check
|
||||
needs: [fe-codestyle-check, sonarcloud-fe-checker]
|
||||
name: FE UT
|
||||
env:
|
||||
PR_NUMBER: ${{ github.event.number }}
|
||||
|
|
@ -459,37 +536,6 @@ jobs:
|
|||
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: Upload Result
|
||||
if: steps.run_ut.outcome == 'success'
|
||||
run: |
|
||||
branch=${{ steps.branch.outputs.branch }}
|
||||
bucket_prefix=${{ steps.branch.outputs.bucket_prefix }}
|
||||
ossutil64 --config-file ~/.ossutilconfig rm oss://${bucket_prefix}-ci-release/$branch/Release/pr/UT-Result/${PR_NUMBER}/ -rf
|
||||
ossutil64 --config-file ~/.ossutilconfig cp fe/fe-core/target/result/ oss://${bucket_prefix}-ci-release/$branch/Release/pr/UT-Result/${PR_NUMBER}/ --recursive --force --tagging="type=ci"
|
||||
|
||||
- name: Upload UT XML
|
||||
if: always()
|
||||
run: |
|
||||
branch=${{ steps.branch.outputs.branch }}
|
||||
bucket_prefix=${{ steps.branch.outputs.bucket_prefix }}
|
||||
ossutil64 --config-file ~/.ossutilconfig rm oss://${bucket_prefix}-ci-release/$branch/Release/pr/UT-XML/${PR_NUMBER}/ -rf
|
||||
ossutil64 --config-file ~/.ossutilconfig cp ${{ steps.run_ut.outputs.FE_REPORT_DIR }}/ oss://${bucket_prefix}-ci-release/$branch/Release/pr/UT-XML/${PR_NUMBER}/ --recursive --force --tagging="type=ci"
|
||||
|
||||
- name: Upload log
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v3
|
||||
|
|
@ -509,7 +555,7 @@ jobs:
|
|||
|
||||
build:
|
||||
runs-on: [self-hosted, normal]
|
||||
needs: [be-checker, fe-checker, be-ut, fe-ut, thirdparty-update]
|
||||
needs: [be-checker, fe-checker, be-ut, clang-tidy, fe-ut, thirdparty-update]
|
||||
name: BUILD
|
||||
env:
|
||||
PR_NUMBER: ${{ github.event.number }}
|
||||
|
|
@ -517,7 +563,7 @@ jobs:
|
|||
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')
|
||||
if: always() && (needs.be-ut.result == 'success' && needs.clang-tidy.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' && needs.clang-tidy.result == 'success')
|
||||
steps:
|
||||
- name: CLEAN
|
||||
run: |
|
||||
|
|
@ -539,11 +585,19 @@ jobs:
|
|||
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 }}
|
||||
./bin/elastic-build.sh --pr ${PR_NUMBER} --repository ${{ github.repository }}
|
||||
|
||||
- name: build result
|
||||
run: |
|
||||
echo ${{ steps.run_build.outputs.OUTPUT_TAR }}
|
||||
echo ${{ steps.run_build.outputs.BASE_VERSION }} > ./base_version.txt
|
||||
|
||||
- name: Upload the Base Version
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: base_version
|
||||
path: ./base_version.txt
|
||||
retention-days: 1
|
||||
|
||||
- name: clean ECI
|
||||
if: always()
|
||||
|
|
@ -594,7 +648,9 @@ jobs:
|
|||
cd ci-tool && source lib/init.sh
|
||||
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}}
|
||||
tar_path="oss://${bucket_prefix}-ci-release/${{steps.branch.outputs.branch}}/Release/pr/${{needs.build.outputs.build_output_tar}}"
|
||||
echo ${tar_path}
|
||||
./bin/deploy-cluster.sh -c ${CLUSTER_NAME} --output ${tar_path} --with-coverage
|
||||
|
||||
- run: |
|
||||
echo "FE: ${{steps.deploy_sr.outputs.fe}}, BE: ${{steps.deploy_sr.outputs.be}}"
|
||||
|
|
@ -659,7 +715,7 @@ jobs:
|
|||
bucket_prefix=${{ steps.branch.outputs.bucket_prefix }}
|
||||
ossutil64 --config-file ~/.ossutilconfig rm oss://${bucket_prefix}-ci-release/$branch/Release/pr/SQL-Tester-XML/${PR_NUMBER}/ -rf
|
||||
ossutil64 --config-file ~/.ossutilconfig cp test/ oss://${bucket_prefix}-ci-release/$branch/Release/pr/SQL-Tester-XML/${PR_NUMBER}/ --include "*.xml" --recursive --force --tagging="type=ci"
|
||||
|
||||
|
||||
- name: Upload log
|
||||
uses: actions/upload-artifact@v3
|
||||
if: always()
|
||||
|
|
@ -667,7 +723,7 @@ jobs:
|
|||
name: SQL-Tester Log
|
||||
path: test/log/
|
||||
retention-days: 1
|
||||
|
||||
|
||||
- name: Clean ENV
|
||||
if: always()
|
||||
run: |
|
||||
|
|
@ -707,7 +763,7 @@ jobs:
|
|||
rm -rf ./StarRocksTest && cp -rf /var/lib/StarRocksTest ./StarRocksTest && cd ./StarRocksTest && git pull
|
||||
|
||||
cd ${{ github.workspace }}/ci-tool
|
||||
./bin/run-admit.sh
|
||||
./bin/run-admit.sh --pr ${PR_NUMBER} --branch ${{steps.branch.outputs.branch}} --build Release --repository ${{ github.repository }}
|
||||
|
||||
- name: Upload Admit XML
|
||||
if: success() || failure()
|
||||
|
|
@ -745,4 +801,4 @@ jobs:
|
|||
- name: Clean
|
||||
run: |
|
||||
rm -f $CONF_FILE
|
||||
rm -rf ${{ github.workspace }}/*
|
||||
rm -rf ${{ github.workspace }}/*
|
||||
|
|
@ -27,33 +27,79 @@ jobs:
|
|||
github.event.workflow_run.event == 'pull_request'
|
||||
outputs:
|
||||
PR_NUMBER: ${{ steps.pr_details.outputs.PR_NUMBER }}
|
||||
HEAD_SHA: ${{ steps.pr_details.outputs.HEAD_SHA }}
|
||||
BASE_REF: ${{ steps.pr_details.outputs.BASE_REF }}
|
||||
BASE_VERSION: ${{ steps.pr_details.outputs.BASE_VERSION }}
|
||||
steps:
|
||||
- name: Download workflow artifact
|
||||
uses: dawidd6/action-download-artifact@v2.11.0
|
||||
- name: Download workflow artifact - PR
|
||||
uses: dawidd6/action-download-artifact@v2
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
run_id: ${{ github.event.workflow_run.id }}
|
||||
workflow: test_fork.yml
|
||||
name: 'pr_num'
|
||||
|
||||
- name: Read the pr_num file
|
||||
- name: Download workflow artifact - HEAD REF
|
||||
uses: dawidd6/action-download-artifact@v2
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
run_id: ${{ github.event.workflow_run.id }}
|
||||
workflow: test_fork.yml
|
||||
name: 'head_sha'
|
||||
|
||||
- name: Read the pr num file
|
||||
id: pr_num_reader
|
||||
uses: juliangruber/read-file-action@v1
|
||||
with:
|
||||
path: ./pr_num.txt
|
||||
|
||||
- name: Read the pr head ref
|
||||
id: head_sha_reader
|
||||
uses: juliangruber/read-file-action@v1
|
||||
with:
|
||||
path: ./head_sha.txt
|
||||
|
||||
- name: Download workflow artifact - BASE VERSION
|
||||
uses: dawidd6/action-download-artifact@v2
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
run_id: ${{ github.event.workflow_run.id }}
|
||||
workflow: test_fork.yml
|
||||
name: 'base_version'
|
||||
if_no_artifact_found: success
|
||||
|
||||
- name: Check Base Version File Exist
|
||||
id: check_version_file_exist
|
||||
run: |
|
||||
if [[ -e ./base_version.txt ]]; then
|
||||
echo "is_exist=true" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
- name: Read the base version file
|
||||
id: base_version_reader
|
||||
if: steps.check_version_file_exist.outputs.is_exist == 'true'
|
||||
uses: juliangruber/read-file-action@v1
|
||||
with:
|
||||
path: ./base_version.txt
|
||||
|
||||
- name: PR DETAILS
|
||||
id: pr_details
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
PR_NUMBER: ${{ steps.pr_num_reader.outputs.content }}
|
||||
HEAD_SHA: ${{ steps.head_sha_reader.outputs.content }}
|
||||
REPO: ${{ github.repository }}
|
||||
run: |
|
||||
PR_NUMBER=`echo ${PR_NUMBER}`
|
||||
HEAD_SHA=`echo ${HEAD_SHA}`
|
||||
base_ref=`gh pr view ${PR_NUMBER} -R ${REPO} --json baseRefName -q .baseRefName`
|
||||
echo "BASE_REF=${base_ref}" >> $GITHUB_OUTPUT
|
||||
echo "PR_NUMBER=${PR_NUMBER}" >> $GITHUB_OUTPUT
|
||||
echo "BASE_REF=${base_ref}" >> $GITHUB_OUTPUT
|
||||
echo "PR_NUMBER=${PR_NUMBER}" >> $GITHUB_OUTPUT
|
||||
echo "HEAD_SHA=${HEAD_SHA}" >> $GITHUB_OUTPUT
|
||||
|
||||
if [[ ${{ steps.check_version_file_exist.outputs.is_exist }} == 'true' ]]; then
|
||||
base_version=`echo "${{ steps.base_version_reader.outputs.content }}"`
|
||||
echo "BASE_VERSION=${base_version}" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
FE-UT-REPORT:
|
||||
runs-on: [ self-hosted, quick ]
|
||||
|
|
@ -61,6 +107,7 @@ jobs:
|
|||
env:
|
||||
PR_NUMBER: ${{ needs.INFO.outputs.PR_NUMBER }}
|
||||
branch: ${{ needs.INFO.outputs.BASE_REF }}
|
||||
BASE_VERSION: ${{ needs.INFO.outputs.BASE_VERSION }}
|
||||
steps:
|
||||
- name: CLEAN
|
||||
run: |
|
||||
|
|
@ -78,16 +125,18 @@ jobs:
|
|||
env:
|
||||
bucket_prefix: ${{ steps.info.outputs.bucket_prefix }}
|
||||
run: |
|
||||
mkdir fe-ut && cd fe-ut
|
||||
oss_path=oss://${bucket_prefix}-ci-release/$branch/Release/pr/UT-XML/${PR_NUMBER}/
|
||||
size=$(ossutil64 --config-file ~/.ossutilconfig du ${oss_path} | grep "total du size" | awk -F':' '{print $NF}')
|
||||
mkdir fe && cd fe
|
||||
oss_path=oss://${bucket_prefix}-ci-release/$branch/Release/pr/UT-Report/${PR_NUMBER}/
|
||||
size=$(ossutil64 --config-file ~/.ossutilconfig ls ${oss_path} | grep "Object Number is" | awk '{print $NF}')
|
||||
echo "size=${size}" >> $GITHUB_OUTPUT
|
||||
if [[ "$size" != "0" ]]; then
|
||||
ossutil64 --config-file ~/.ossutilconfig cp ${oss_path} . --recursive
|
||||
tar zxf fe_ut_report.tar.gz
|
||||
fi
|
||||
|
||||
- name: Publish UT Report
|
||||
uses: mikepenz/action-junit-report@v3
|
||||
id: publish_report
|
||||
if: steps.download-ut-xml.outputs.size != '0'
|
||||
env:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
|
@ -97,24 +146,49 @@ jobs:
|
|||
detailed_summary: true
|
||||
fail_on_failure: true
|
||||
commit: ${{ github.event.workflow_run.head_sha }}
|
||||
report_paths: ./fe-ut/*.xml
|
||||
report_paths: ./fe/fe-core/target/surefire-reports/*.xml
|
||||
|
||||
# Incremental Coverage
|
||||
- name: Download Incremental Coverage Result
|
||||
id: download-incremental-result
|
||||
- name: Merge FE Coverage
|
||||
if: steps.download-ut-xml.outputs.size != '0'
|
||||
env:
|
||||
bucket_prefix: ${{ steps.info.outputs.bucket_prefix }}
|
||||
fe_path: ${{ github.workspace }}/fe
|
||||
run: |
|
||||
mkdir fe-result && cd fe-result
|
||||
oss_path=oss://${bucket_prefix}-ci-release/$branch/Release/pr/UT-Result/${PR_NUMBER}/
|
||||
size=$(ossutil64 --config-file ~/.ossutilconfig du ${oss_path} | grep "total du size" | awk -F':' '{print $NF}')
|
||||
echo "size=${size}" >> $GITHUB_OUTPUT
|
||||
if [[ "$size" != "0" ]]; then
|
||||
ossutil64 --config-file ~/.ossutilconfig cp ${oss_path} . --recursive
|
||||
set -ex
|
||||
export JAVA_HOME=/var/local/env/jdk1.8.0_202;
|
||||
export PATH=$JAVA_HOME/bin:$PATH;
|
||||
rm -rf ./ci-tool && cp -rf /var/lib/ci-tool ./ci-tool && cd ci-tool && git pull && source lib/init.sh
|
||||
if [[ -e ${fe_path}/test.exec ]]; then
|
||||
java -jar package/jacococli.jar merge ${fe_path}/fe-core/target/jacoco.exec ${fe_path}/test.exec --destfile ${fe_path}/merge.exec
|
||||
else
|
||||
cp ${fe_path}/fe-core/target/jacoco.exec ${fe_path}/merge.exec
|
||||
fi
|
||||
|
||||
- name: Publish Incremental Coverage Report
|
||||
if: steps.download-incremental-result.outputs.size != '0'
|
||||
- name: Generate XML Report
|
||||
env:
|
||||
package_path: ${{ github.workspace }}/ci-tool/package
|
||||
fe_path: ${{ github.workspace }}/fe
|
||||
fe_core_path: ${{ github.workspace }}/fe/fe-core
|
||||
if: steps.publish_report.outcome == 'success'
|
||||
run: |
|
||||
set -x
|
||||
rm -rf result
|
||||
export JAVA_HOME=/var/local/env/jdk1.8.0_202;
|
||||
export PATH=$JAVA_HOME/bin:$PATH;
|
||||
cd ${fe_core_path}/target/classes;
|
||||
rm -rf com/starrocks/thrift/;
|
||||
rm -rf com/starrocks/proto/;
|
||||
rm -rf org;
|
||||
rm -rf com/starrocks/sql/parser;
|
||||
rm -rf com/starrocks/builtins;
|
||||
rm -rf com/starrocks/common/Version.class;
|
||||
cd ${{ github.workspace }};
|
||||
java -jar $package_path/jacococli.jar report ${fe_path}/merge.exec --classfiles ${fe_core_path}/target/classes/ \
|
||||
--html ./result --xml ${{ github.workspace }}/coverage.xml \
|
||||
--sourcefiles ${fe_core_path}/src/main/java/ --encoding utf-8 --name fe-coverage
|
||||
|
||||
# Incremental Total Coverage
|
||||
- name: Publish Incremental Coverage Report - Total
|
||||
if: success()
|
||||
run: |
|
||||
rm -rf ./coverchecker && ln -s /var/local/env/coverchecker ./coverchecker && cd coverchecker && git pull
|
||||
time_count=0
|
||||
|
|
@ -126,11 +200,28 @@ jobs:
|
|||
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-result/ --github-token ${{ secrets.PAT }} \
|
||||
--cover ${{ github.workspace }}/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
|
||||
rm -rf coverchecker
|
||||
rm -rf ci-tools
|
||||
|
||||
# total coverage
|
||||
- name: Coverage Report
|
||||
uses: codecov/codecov-action@v3
|
||||
if: success()
|
||||
with:
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
files: ${{ github.workspace }}/coverage.xml
|
||||
dry_run: false
|
||||
name: fe-total
|
||||
fail_ci_if_error: false
|
||||
verbose: true
|
||||
override_pr: ${{ needs.INFO.outputs.PR_NUMBER }}
|
||||
override_branch: ${{ needs.INFO.outputs.BASE_REF }}
|
||||
override_commit: ${{ needs.INFO.outputs.HEAD_SHA }}
|
||||
|
||||
SQL-Tester-REPORT:
|
||||
runs-on: [ self-hosted, quick ]
|
||||
|
|
@ -157,7 +248,7 @@ jobs:
|
|||
run: |
|
||||
mkdir sql-tester-result && cd sql-tester-result
|
||||
oss_path=oss://${bucket_prefix}-ci-release/$branch/Release/pr/SQL-Tester-XML/${PR_NUMBER}/
|
||||
size=$(ossutil64 --config-file ~/.ossutilconfig du ${oss_path} | grep "total du size" | awk -F':' '{print $NF}')
|
||||
size=$(ossutil64 --config-file ~/.ossutilconfig ls ${oss_path} | grep "Object Number is" | awk '{print $NF}')
|
||||
echo "size=${size}" >> $GITHUB_OUTPUT
|
||||
if [[ "$size" != "0" ]]; then
|
||||
ossutil64 --config-file ~/.ossutilconfig cp ${oss_path} . --recursive
|
||||
|
|
@ -207,7 +298,7 @@ jobs:
|
|||
run: |
|
||||
mkdir admit-result && cd admit-result
|
||||
oss_path=oss://${bucket_prefix}-ci-release/$branch/Release/pr/Admit-XML/${PR_NUMBER}/
|
||||
size=$(ossutil64 --config-file ~/.ossutilconfig du ${oss_path} | grep "total du size" | awk -F':' '{print $NF}')
|
||||
size=$(ossutil64 --config-file ~/.ossutilconfig ls ${oss_path} | grep "Object Number is" | awk '{print $NF}')
|
||||
echo "size=${size}" >> $GITHUB_OUTPUT
|
||||
if [[ "$size" != "0" ]]; then
|
||||
ossutil64 --config-file ~/.ossutilconfig cp ${oss_path} . --recursive
|
||||
|
|
|
|||
|
|
@ -1,68 +0,0 @@
|
|||
name: code-check
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- 'branch-[0-9].[0-9]'
|
||||
paths:
|
||||
- 'fe/**.java'
|
||||
- 'fe/**.xml'
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
- reopened
|
||||
- synchronize
|
||||
branches:
|
||||
- main
|
||||
- 'branch-[0-9].[0-9]'
|
||||
paths:
|
||||
- 'fe/**.java'
|
||||
- 'fe/**.xml'
|
||||
|
||||
jobs:
|
||||
sonarcloud-fe:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
|
||||
|
||||
- name: Set up JDK 11
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
java-version: 11
|
||||
distribution: 'adopt'
|
||||
|
||||
- name: Cache SonarCloud packages
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ~/.sonar/cache
|
||||
key: ${{ runner.os }}-sonar
|
||||
restore-keys: ${{ runner.os }}-sonar
|
||||
|
||||
- name: Cache Maven packages
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ~/.m2
|
||||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
|
||||
restore-keys: ${{ runner.os }}-maven
|
||||
|
||||
- name: Setup thrift
|
||||
uses: dodopizza/setup-thrift@v1
|
||||
with:
|
||||
version: 0.13.0
|
||||
|
||||
- name: Analyze FE
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
|
||||
SONAR_TOKEN: f0fb4d25c03bae90c2e994c45c29c49dc86fc169 # ${{ secrets.SONAR_TOKEN }}
|
||||
run: |
|
||||
thrift --version
|
||||
whereis thrift
|
||||
export STARROCKS_HOME=${{ github.workspace }}
|
||||
source env.sh
|
||||
mkdir -p thirdparty/installed/bin/
|
||||
cd thirdparty/installed/bin/ && ln -s /usr/local/bin/thrift thrift
|
||||
cd ${{ github.workspace }}/fe
|
||||
mvn -B -DskipTests verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=StarRocks_starrocks -Dsonar.pullrequest.key=${{ github.event.number }} -Dsonar.pullrequest.base=${{ github.base_ref }} -Dsonar.pullrequest.branch=${{ github.head_ref }}
|
||||
|
|
@ -6,7 +6,7 @@ github_checks:
|
|||
coverage:
|
||||
status:
|
||||
project:
|
||||
fe-ut:
|
||||
fe-total:
|
||||
target: 60%
|
||||
threshold: 5%
|
||||
only_pulls: true
|
||||
|
|
|
|||
|
|
@ -58,7 +58,10 @@ url = http://${mysql-client:host}:${mysql-client:http_port}
|
|||
|
||||
## Running your test
|
||||
```shell
|
||||
# run concurrent cases
|
||||
$ python3 run.py
|
||||
# run sequential cases
|
||||
$ python3 run.py -a sequential -c 1 -v
|
||||
```
|
||||
|
||||
# <span id="Parameters">Run Parameters<span>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
-- name: test_continuous_insert
|
||||
-- name: __test_continuous_insert
|
||||
CREATE TABLE `allstring` (
|
||||
`v1` varchar(20) NOT NULL COMMENT ""
|
||||
) ENGINE=OLAP
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ record_mode = os.environ.get("record_mode", "false") == "true"
|
|||
case_list = choose_cases.choose_cases(record_mode).case_list
|
||||
|
||||
if len(case_list) == 0:
|
||||
print("** ERROR: No case! **")
|
||||
print("** INFO: No case! **")
|
||||
sys.exit(0)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue