From 96de335b3c34dcb5e01fec30b5edd75031185fa4 Mon Sep 17 00:00:00 2001 From: Vitalii Koshura Date: Mon, 22 Mar 2021 20:32:57 +0100 Subject: [PATCH] [Codecov] Use action to upload coverage report Signed-off-by: Vitalii Koshura --- .github/workflows/android.yml | 11 +++++++++-- .github/workflows/linux.yml | 10 +++++++++- .github/workflows/mingw.yml | 3 ++- tests/executeUnitTests.sh | 8 -------- 4 files changed, 20 insertions(+), 12 deletions(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 2a17e2134f..c70f14860e 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -39,7 +39,6 @@ jobs: if: ${{ success() && matrix.type == 'manager' }} run: | ./android/ci_build_manager.sh - bash <(curl -s https://codecov.io/bash) - name: Build libs if: ${{ success() && matrix.type == 'libs' }} @@ -57,8 +56,16 @@ jobs: PULL_REQUEST_SHA: ${{ github.event.pull_request.head.sha }} run: ./deploy/prepare_deployment.sh android_${{ matrix.type }} && ./deploy/deploy_to_bintray.sh deploy/android_${{ matrix.type }}/ - - uses: actions/upload-artifact@v2 + - name: Upload artifacts + uses: actions/upload-artifact@v2 if: ${{ ! contains(matrix.type, 'libs') }} with: name: android_${{ matrix.type }}_${{ github.event.pull_request.head.sha }} path: deploy/android_${{ matrix.type }}/*.7z + + - name: Upload coverage report + uses: codecov/codecov-action@v1 + if: ${{ success() && matrix.type == 'manager' }} + with: + fail_ci_if_error: true + verbose: false diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 1fa2bfecea..517b9aa3b7 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -92,8 +92,16 @@ jobs: PULL_REQUEST_SHA: ${{ github.event.pull_request.head.sha }} run: ./deploy/prepare_deployment.sh linux_${{ matrix.type }} && ./deploy/deploy_to_bintray.sh deploy/linux_${{ matrix.type }}/ - - uses: actions/upload-artifact@v2 + - name: Upload artifacts + uses: actions/upload-artifact@v2 if: ${{ ! contains(matrix.type, 'libs') && ! contains(matrix.type, 'server') && ! contains(matrix.type, 'test') }} with: name: linux_${{ matrix.type }}_${{ github.event.pull_request.head.sha }} path: deploy/linux_${{ matrix.type }}/*.7z + + - name: Upload coverage report + uses: codecov/codecov-action@v1 + if: success() && matrix.type == 'unit-test' + with: + fail_ci_if_error: true + verbose: false diff --git a/.github/workflows/mingw.yml b/.github/workflows/mingw.yml index fc1478f3bb..158d26aab0 100644 --- a/.github/workflows/mingw.yml +++ b/.github/workflows/mingw.yml @@ -39,7 +39,8 @@ jobs: PULL_REQUEST_SHA: ${{ github.event.pull_request.head.sha }} run: ./deploy/prepare_deployment.sh win_${{ matrix.type }} && ./deploy/deploy_to_bintray.sh deploy/win_${{ matrix.type }}/ - - uses: actions/upload-artifact@v2 + - name: Upload artifacts + uses: actions/upload-artifact@v2 if: ${{ ! contains(matrix.type, 'libs') }} with: name: win_${{ matrix.type }}_${{ github.event.pull_request.head.sha }} diff --git a/tests/executeUnitTests.sh b/tests/executeUnitTests.sh index ee4df4d9db..1623bf9d19 100755 --- a/tests/executeUnitTests.sh +++ b/tests/executeUnitTests.sh @@ -74,11 +74,3 @@ if [ $? -ne 0 ]; then cd ../..; exit 1; fi for T in lib sched; do [ -d "${T}" ] && ./${T}/test_${T}; done - -cd ../.. -if [ "${report}" = "yes" ]; then - #for T in lib sched; do - # [ -d "${T}" ] && gcov -lp *.o >/dev/null; - #done - bash <(curl -s https://codecov.io/bash) -fi