Skip to content
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
13 changes: 10 additions & 3 deletions .github/workflows/cmake-gcc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,20 +46,27 @@ jobs:
python3 -m pip install --upgrade pip
python3 -m pip install gcovr
gcovr --version
gcovr -r . --gcov-executable gcov-${{env.GCC_VERSION}} --object-directory ${{env.BUILD_DIR}} --exclude 'test/.*' --exclude '3p/.*' --lcov -o coverage.info
gcovr \
--root "$GITHUB_WORKSPACE" \
--gcov-executable gcov-${{env.GCC_VERSION}} \
--object-directory ${{env.BUILD_DIR}} \
--exclude 'test/.*' \
--exclude '3p/.*' \
--xml \
-o coverage.xml

- name: Upload coverage to Codecov
if: ${{matrix.build_type == 'Debug' && github.event_name != 'pull_request'}}
uses: codecov/codecov-action@v5
with:
fail_ci_if_error: true
verbose: true
files: coverage.info
files: coverage.xml
token: ${{ secrets.CODECOV_TOKEN }}

- name: Store coverage for fork PR upload
if: ${{matrix.build_type == 'Debug' && github.event_name == 'pull_request'}}
uses: actions/upload-artifact@v4
with:
name: coverage
path: coverage.info
path: coverage.xml
8 changes: 7 additions & 1 deletion .github/workflows/codecov-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,18 @@ jobs:
repository: ${{github.repository}}
run-id: ${{github.event.workflow_run.id}}

- name: Checkout pull request source
uses: actions/checkout@v4
with:
repository: ${{github.event.workflow_run.head_repository.full_name}}
ref: ${{github.event.workflow_run.head_sha}}

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
fail_ci_if_error: true
verbose: true
files: coverage/coverage.info
files: coverage/coverage.xml
token: ${{secrets.CODECOV_TOKEN}}
override_commit: ${{github.event.workflow_run.head_sha}}
override_pr: ${{github.event.workflow_run.pull_requests[0].number}}
Loading