This is an automated email from the ASF dual-hosted git repository.
hgruszecki pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iggy.git
The following commit(s) were added to refs/heads/master by this push:
new f36c5ee0b ci(csharp): add C# coverage upload to Codecov (#2782)
f36c5ee0b is described below
commit f36c5ee0bb4922969c5313b2160c6f60518c0ff5
Author: Ćukasz Zborek <[email protected]>
AuthorDate: Mon Feb 23 12:28:47 2026 +0100
ci(csharp): add C# coverage upload to Codecov (#2782)
Co-authored-by: Hubert Gruszecki <[email protected]>
---
.github/actions/csharp-dotnet/pre-merge/action.yml | 17 ++++-
.github/workflows/_test.yml | 12 ++++
.github/workflows/post-merge.yml | 72 ++++++++++++++++++++++
codecov.yml | 4 +-
4 files changed, 102 insertions(+), 3 deletions(-)
diff --git a/.github/actions/csharp-dotnet/pre-merge/action.yml
b/.github/actions/csharp-dotnet/pre-merge/action.yml
index 035e8650b..2e7272503 100644
--- a/.github/actions/csharp-dotnet/pre-merge/action.yml
+++ b/.github/actions/csharp-dotnet/pre-merge/action.yml
@@ -65,7 +65,13 @@ runs:
working-directory: foreign/csharp
run: |
# Run unit tests
- dotnet test --project Iggy_SDK_Tests --no-build --verbosity normal
+ dotnet test --project Iggy_SDK_Tests \
+ --no-build \
+ --verbosity normal \
+ --coverage \
+ --coverage-output-format cobertura \
+ --coverage-output coverage.cobertura.xml \
+ --results-directory ./reports
shell: bash
@@ -85,7 +91,14 @@ runs:
IGGY_SERVER_DOCKER_IMAGE: ${{ steps.docker_build.outputs.docker_image
}}
IGGY_TEST_LOGS_DIR: ./reports/container-logs
run: |
- dotnet test --project Iggy_SDK.Tests.Integration --no-build
--verbosity normal --results-directory ./reports -- --report-trx
+ dotnet test --project Iggy_SDK.Tests.Integration \
+ --no-build \
+ --verbosity normal \
+ --coverage \
+ --coverage-output-format cobertura \
+ --coverage-output coverage.cobertura.xml \
+ --results-directory ./reports \
+ -- --report-trx
shell: bash
- name: Collect container logs
diff --git a/.github/workflows/_test.yml b/.github/workflows/_test.yml
index b05626676..66fe9d982 100644
--- a/.github/workflows/_test.yml
+++ b/.github/workflows/_test.yml
@@ -123,6 +123,18 @@ jobs:
with:
task: ${{ inputs.task }}
+ - name: Upload C# coverage to Codecov
+ if: inputs.component == 'sdk-csharp' && (inputs.task == 'test' ||
inputs.task == 'e2e')
+ uses: codecov/codecov-action@v5
+ with:
+ token: ${{ secrets.CODECOV_TOKEN }}
+ files: foreign/csharp/reports/coverage.cobertura.xml
+ disable_search: true
+ flags: csharp
+ fail_ci_if_error: false
+ verbose: true
+ override_pr: ${{ github.event.pull_request.number }}
+
# Web UI
- name: Run Web UI task
if: inputs.component == 'web-ui'
diff --git a/.github/workflows/post-merge.yml b/.github/workflows/post-merge.yml
index e1f4ceecc..14105cffe 100644
--- a/.github/workflows/post-merge.yml
+++ b/.github/workflows/post-merge.yml
@@ -271,6 +271,78 @@ jobs:
flags: java
fail_ci_if_error: false
+ csharp-coverage:
+ name: C# coverage baseline
+ runs-on: ubuntu-latest
+ timeout-minutes: 30
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Setup .NET
+ uses: actions/setup-dotnet@v4
+ with:
+ dotnet-version: "10.0.x"
+
+ - name: Setup Rust with cache
+ uses: ./.github/actions/utils/setup-rust-with-cache
+ with:
+ save-cache: "false"
+
+ - name: Build Iggy server Docker image
+ id: docker_build
+ uses: ./.github/actions/utils/docker-build-test-server
+ with:
+ image-tag: "iggy-server:test"
+ libc: "glibc"
+ profile: "debug"
+
+ - name: Restore and build
+ working-directory: foreign/csharp
+ run: |
+ dotnet restore Iggy_SDK.sln
+ dotnet build Iggy_SDK.sln --no-restore
+
+ - name: Run unit tests with coverage
+ working-directory: foreign/csharp
+ run: |
+ dotnet test \
+ --project Iggy_SDK_Tests \
+ --no-build \
+ --verbosity normal \
+ --coverage \
+ --coverage-output-format cobertura \
+ --coverage-output coverage.cobertura.xml \
+ --results-directory ./reports/unit
+
+ - name: Run integration tests with coverage
+ working-directory: foreign/csharp
+ env:
+ IGGY_SERVER_DOCKER_IMAGE: ${{
steps.docker_build.outputs.docker_image }}
+ run: |
+ dotnet test \
+ --project Iggy_SDK.Tests.Integration \
+ --no-build \
+ --verbosity normal \
+ --coverage \
+ --coverage-output-format cobertura \
+ --coverage-output coverage.cobertura.xml \
+ --results-directory ./reports/integration
+
+ - name: Merge coverage reports
+ working-directory: foreign/csharp
+ run: |
+ dotnet tool install --global dotnet-coverage
+ dotnet-coverage merge ./reports/**/*.cobertura.xml -f cobertura -o
./reports/coverage.cobertura.xml
+
+ - name: Upload to Codecov
+ uses: codecov/codecov-action@v5
+ with:
+ token: ${{ secrets.CODECOV_TOKEN }}
+ files: foreign/csharp/reports/coverage.cobertura.xml
+ disable_search: true
+ flags: csharp
+ fail_ci_if_error: false
+
create-prerelease:
name: Create edge pre-release
runs-on: ubuntu-latest
diff --git a/codecov.yml b/codecov.yml
index 2e0bf7962..156b037b0 100644
--- a/codecov.yml
+++ b/codecov.yml
@@ -53,6 +53,9 @@ flag_management:
- name: java
paths:
- foreign/java/
+ - name: csharp
+ paths:
+ - foreign/csharp/
comment:
layout: "header, diff, flags, files"
@@ -68,7 +71,6 @@ ignore:
- "core/harness_derive/**"
- "bdd/**"
- "examples/**"
- - "foreign/csharp/**"
- "foreign/go/**"
- "foreign/node/**"
- "foreign/python/**"