diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 2fb1d11989..740415006c 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -33,7 +33,7 @@ on: - '!build/ci/jenkins/**' jobs: - ubuntu: + UT: name: Build and test AMD64 Ubuntu ${{ matrix.ubuntu }} runs-on: ubuntu-${{ matrix.ubuntu }} timeout-minutes: 60 @@ -85,6 +85,34 @@ jobs: for container in $(docker ps --format "table {{.Names}}" | grep -v "NAMES"); do echo "restart count for ${container} is $(docker inspect ${container} --format '{{json .RestartCount}}')" 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 if: "github.repository == 'milvus-io/milvus'" uses: codecov/codecov-action@v3.1.1 @@ -92,14 +120,6 @@ jobs: with: token: ${{ secrets.CODECOV_TOKEN }} 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 \ No newline at end of file + verbose: true \ No newline at end of file