[skip e2e] Move codecov as separate job (#20381)

Signed-off-by: Jenny Li <jing.li@zilliz.com>

Signed-off-by: Jenny Li <jing.li@zilliz.com>
This commit is contained in:
Jenny Li 2022-11-08 19:59:03 +08:00 committed by GitHub
parent f925fa7661
commit b97c36cd41
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -33,7 +33,7 @@ on:
- '!build/ci/jenkins/**' - '!build/ci/jenkins/**'
jobs: jobs:
ubuntu: UT:
name: Build and test AMD64 Ubuntu ${{ matrix.ubuntu }} name: Build and test AMD64 Ubuntu ${{ matrix.ubuntu }}
runs-on: ubuntu-${{ matrix.ubuntu }} runs-on: ubuntu-${{ matrix.ubuntu }}
timeout-minutes: 60 timeout-minutes: 60
@ -85,6 +85,34 @@ jobs:
for container in $(docker ps --format "table {{.Names}}" | grep -v "NAMES"); do for container in $(docker ps --format "table {{.Names}}" | grep -v "NAMES"); do
echo "restart count for ${container} is $(docker inspect ${container} --format '{{json .RestartCount}}')" echo "restart count for ${container} is $(docker inspect ${container} --format '{{json .RestartCount}}')"
done done
- name: Archive code coverage results
uses: actions/upload-artifact@v3
with:
name: code-coverage-result
path: |
./go_coverage.txt
./lcov_output.info
*.info
*.out
codecov.yml
internal/**
cmd/**
configs/**
pkg/**
go.mod
go.sum
codecov:
name: Upload Code Coverage
needs: UT
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Download code coverage results
uses: actions/download-artifact@v3.0.1
with:
name: code-coverage-result
- name: Display structure of code coverage results
run: ls -lah
- name: Upload coverage to Codecov - name: Upload coverage to Codecov
if: "github.repository == 'milvus-io/milvus'" if: "github.repository == 'milvus-io/milvus'"
uses: codecov/codecov-action@v3.1.1 uses: codecov/codecov-action@v3.1.1
@ -92,14 +120,6 @@ jobs:
with: with:
token: ${{ secrets.CODECOV_TOKEN }} token: ${{ secrets.CODECOV_TOKEN }}
files: ./go_coverage.txt,./lcov_output.info files: ./go_coverage.txt,./lcov_output.info
name: ubuntu-${{ matrix.ubuntu }}-unittests name: ubuntu-20.04-unittests
fail_ci_if_error: true
- name: Retry Upload coverage to Codecov
if: "${{ failure() }} && github.repository == 'milvus-io/milvus'"
uses: codecov/codecov-action@v3.1.1
id: retry_upload_cov
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./go_coverage.txt,./lcov_output.info
name: ubuntu-${{ matrix.ubuntu }}-unittests
fail_ci_if_error: true fail_ci_if_error: true
verbose: true