Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Fix usage of codecov. #2939

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .ci/docker.env
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ WITH_TCTI
GEN_FUZZ
TEST_TCTI_CONFIG
ENABLE_COVERAGE
CODECOV_TOKEN
3 changes: 2 additions & 1 deletion .ci/docker.run
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ if [ -n "$BASE_REF" ]; then
fi

if [ "$ENABLE_COVERAGE" == "true" ]; then
bash <(curl -s https://codecov.io/bash)
lcov --capture --directory . --output-file ./coverage.info
fi

exit 0
9 changes: 9 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,15 @@ jobs:
DOCKER_IMAGE: ubuntu-20.04
ENABLE_COVERAGE: true
PROJECT_NAME: ${{ github.event.repository.name }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: Upload Coverage to Codecov
uses: codecov/codecov-action@v4
with:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
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
Expand Down
Loading