Skip to content
Snippets Groups Projects
Unverified Commit 992765a7 authored by brown's avatar brown Committed by GitHub
Browse files

CI: improve ci by modify upload condition (#4731)

No data and logs are uploaded when a job runs successfully, and vice versa, improving the efficiency of ci job execution.

Approved by: @sukki37
parent e7bd58f1
No related branches found
No related tags found
No related merge requests found
......@@ -32,7 +32,7 @@ jobs:
make ut
- uses: actions/upload-artifact@v2
if: ${{ always() && !cancelled() }}
if: ${{ failure() }}
continue-on-error: true
with:
name: ut_linux_x86_reports
......@@ -58,7 +58,7 @@ jobs:
make ut
- uses: actions/upload-artifact@v2
if: ${{ always() && !cancelled() }}
if: ${{ failure() }}
continue-on-error: true
with:
name: ut_darwin_x86_reports
......@@ -84,7 +84,7 @@ jobs:
make ut
- uses: actions/upload-artifact@v2
if: ${{ always() && !cancelled() }}
if: ${{ failure() }}
continue-on-error: true
with:
name: ut_linux_arm_reports
......@@ -142,12 +142,11 @@ jobs:
./run.sh -n -g -p $GITHUB_WORKSPACE/head/test/cases 2>&1
- name: Check mo-service Status
if: ${{ always() }}
if: ${{ always() && !cancelled() }}
run: |
if [ "$(ps -ef | grep 'mo-service' | grep -v "grep" | wc -l)" -gt 0 ]; then pkill -9 mo-service; else echo 'current mo-service has already crashed'; exit 1; fi
- name: remove some files
if: ${{ always() }}
continue-on-error: true
run: |
cd $GITHUB_WORKSPACE
......@@ -156,7 +155,7 @@ jobs:
rm -rf ./mo-tester/lib
- uses: actions/upload-artifact@v2
if: ${{ always() && !cancelled() }}
if: ${{ failure() }}
continue-on-error: true
with:
name: linux_x86_ci_reports
......@@ -214,12 +213,11 @@ jobs:
./run.sh -n -g -p $GITHUB_WORKSPACE/head/test/cases 2>&1
- name: Check mo-service Status
if: ${{ always() }}
if: ${{ always() && !cancelled() }}
run: |
if [ "$(ps -ef | grep 'mo-service' | grep -v "grep" | wc -l)" -gt 0 ]; then pkill -9 mo-service; else echo 'current mo-service has already crashed'; exit 1; fi
- name: remove some files
if: ${{ always() }}
continue-on-error: true
run: |
cd $GITHUB_WORKSPACE
......@@ -228,7 +226,7 @@ jobs:
rm -rf ./mo-tester/lib
- uses: actions/upload-artifact@v2
if: ${{ always() && !cancelled() }}
if: ${{ failure() }}
continue-on-error: true
with:
name: ci_linux_arm_reports
......@@ -284,12 +282,11 @@ jobs:
./run.sh -n -g -p $GITHUB_WORKSPACE/head/test/cases 2>&1
- name: Check MO-Service Status
if: ${{ always() }}
if: ${{ always() && !cancelled() }}
run: |
if [ "$(ps -ef | grep 'mo-service' | grep -v "grep" | wc -l)" -gt 0 ]; then pkill -9 mo-service; else echo 'current mo-service has already crashed'; exit 1; fi
- name: remove some files
if: ${{ always() }}
continue-on-error: true
run: |
cd $GITHUB_WORKSPACE
......@@ -298,7 +295,7 @@ jobs:
rm -rf ./mo-tester/lib
- uses: actions/upload-artifact@v2
if: ${{ always() && !cancelled() }}
if: ${{ failure() }}
continue-on-error: true
with:
name: ci_darwin_x86_reports
......@@ -333,4 +330,4 @@ jobs:
run: |
cd $GITHUB_WORKSPACE
make static-check
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment