From b4a11a02b7298bfc92f81bf42333d768688300d5 Mon Sep 17 00:00:00 2001 From: vvish Date: Sat, 3 Oct 2026 20:12:43 +0200 Subject: [PATCH 1/4] Test fix for codecov coverage report --- .github/workflows/cmake-gcc.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cmake-gcc.yml b/.github/workflows/cmake-gcc.yml index ce4859f..a81026a 100644 --- a/.github/workflows/cmake-gcc.yml +++ b/.github/workflows/cmake-gcc.yml @@ -46,7 +46,7 @@ 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 -r . --gcov-executable gcov-${{env.GCC_VERSION}} --object-directory ${{env.BUILD_DIR}} --exclude 'test/.*' --exclude '3p/.*' --root "$GITHUB_WORKSPACE" --lcov -o coverage.info - name: Upload coverage to Codecov if: ${{matrix.build_type == 'Debug' && github.event_name != 'pull_request'}} From 8c85a4052e1ecc1a2e05331345ab50869854e7a1 Mon Sep 17 00:00:00 2001 From: vvish Date: Sun, 4 Oct 2026 01:47:49 +0200 Subject: [PATCH 2/4] Use cobertura report format --- .github/workflows/cmake-gcc.yml | 6 +++--- .github/workflows/codecov-pr.yml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cmake-gcc.yml b/.github/workflows/cmake-gcc.yml index a81026a..42fe6a5 100644 --- a/.github/workflows/cmake-gcc.yml +++ b/.github/workflows/cmake-gcc.yml @@ -46,7 +46,7 @@ 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/.*' --root "$GITHUB_WORKSPACE" --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'}} @@ -54,7 +54,7 @@ jobs: 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 @@ -62,4 +62,4 @@ jobs: uses: actions/upload-artifact@v4 with: name: coverage - path: coverage.info + path: coverage.xml diff --git a/.github/workflows/codecov-pr.yml b/.github/workflows/codecov-pr.yml index 2b82cf4..0b9758e 100644 --- a/.github/workflows/codecov-pr.yml +++ b/.github/workflows/codecov-pr.yml @@ -28,7 +28,7 @@ jobs: 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}} From 4e06a1cd90c66db39df078631b2425b3731a77b7 Mon Sep 17 00:00:00 2001 From: vvish Date: Sun, 4 Oct 2026 02:01:26 +0200 Subject: [PATCH 3/4] Wrap gcovr cmd --- .github/workflows/cmake-gcc.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cmake-gcc.yml b/.github/workflows/cmake-gcc.yml index 42fe6a5..c78803b 100644 --- a/.github/workflows/cmake-gcc.yml +++ b/.github/workflows/cmake-gcc.yml @@ -46,7 +46,14 @@ jobs: python3 -m pip install --upgrade pip python3 -m pip install gcovr gcovr --version - gcovr --root "$GITHUB_WORKSPACE" --gcov-executable gcov-${{env.GCC_VERSION}} --object-directory ${{env.BUILD_DIR}} --exclude 'test/.*' --exclude '3p/.*' --xml -o coverage.xml + 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'}} From 0a7dda09e617e57cb294a174791cc984238b1278 Mon Sep 17 00:00:00 2001 From: vvish Date: Sun, 4 Oct 2026 02:07:35 +0200 Subject: [PATCH 4/4] Checkout --- .github/workflows/codecov-pr.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/codecov-pr.yml b/.github/workflows/codecov-pr.yml index 0b9758e..d2d4f7e 100644 --- a/.github/workflows/codecov-pr.yml +++ b/.github/workflows/codecov-pr.yml @@ -23,6 +23,12 @@ 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: