From 5ce14b4fb9dd14949df0d2d2c7e2319be20d6c56 Mon Sep 17 00:00:00 2001 From: andyziye <108652123+andyziye@users.noreply.github.com> Date: Mon, 10 Jul 2023 18:17:40 +0800 Subject: [PATCH] [Tool] Ignore result upload if UT is failed (#26878) Signed-off-by: AndyZiYe --- .github/workflows/ci-merged.yml | 2 ++ .github/workflows/ci-pipeline-branch.yml | 2 +- .github/workflows/ci-pipeline.yml | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-merged.yml b/.github/workflows/ci-merged.yml index 7f248715a9986..22673aeaf7528 100644 --- a/.github/workflows/ci-merged.yml +++ b/.github/workflows/ci-merged.yml @@ -126,6 +126,8 @@ jobs: echo "commit_sha=${commit_sha}" >> $GITHUB_OUTPUT - name: update merged coverage + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | rm -rf ./ci-tool && cp -rf /var/lib/ci-tool ./ci-tool && cd ci-tool && git pull && source lib/init.sh ./bin/upload_cov_after_merge.sh --pr ${PR_NUMBER} --commit ${{ steps.commit_sha.outputs.commit_sha }} diff --git a/.github/workflows/ci-pipeline-branch.yml b/.github/workflows/ci-pipeline-branch.yml index a41c5ff9acddd..68174a91061c8 100644 --- a/.github/workflows/ci-pipeline-branch.yml +++ b/.github/workflows/ci-pipeline-branch.yml @@ -430,7 +430,7 @@ jobs: verbose: true - name: Upload Result - if: always() + if: steps.run_ut.outcome == 'success' run: | branch=${{ steps.branch.outputs.branch }} bucket_prefix=${{ steps.branch.outputs.bucket_prefix }} diff --git a/.github/workflows/ci-pipeline.yml b/.github/workflows/ci-pipeline.yml index 30755cf84ea68..64ec980b78422 100644 --- a/.github/workflows/ci-pipeline.yml +++ b/.github/workflows/ci-pipeline.yml @@ -475,7 +475,7 @@ jobs: verbose: true - name: Upload Result - if: always() + if: steps.run_ut.outcome == 'success' run: | branch=${{ steps.branch.outputs.branch }} bucket_prefix=${{ steps.branch.outputs.bucket_prefix }}