diff --git a/.ci/docker.env b/.ci/docker.env index ef4fb2d58..6f2a304a2 100644 --- a/.ci/docker.env +++ b/.ci/docker.env @@ -24,3 +24,4 @@ WITH_TCTI GEN_FUZZ TEST_TCTI_CONFIG ENABLE_COVERAGE +CODECOV_TOKEN diff --git a/.ci/docker.run b/.ci/docker.run index c45c8ad52..8ed55ae61 100755 --- a/.ci/docker.run +++ b/.ci/docker.run @@ -150,7 +150,4 @@ if [ -n "$BASE_REF" ]; then git diff --check "origin/$BASE_REF" fi -if [ "$ENABLE_COVERAGE" == "true" ]; then - bash <(curl -s https://codecov.io/bash) -fi exit 0 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 76e4a645a..f9c2ea275 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -132,6 +132,15 @@ jobs: DOCKER_IMAGE: ubuntu-20.04 ENABLE_COVERAGE: true PROJECT_NAME: ${{ github.event.repository.name }} + - name: Generate Coverage Data + run: lcov --capture --directory . --output-file coverage.info + - name: Upload Coverage to Codecov + uses: codecov/codecov-action@v4 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: ./coverage.info + fail_ci_if_error: true + verbose: true - name: failure if: ${{ failure() }} run: cat $(find ../ -name test-suite.log) || true