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
19 changes: 12 additions & 7 deletions .github/actions/csharp-dotnet/pre-merge/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ description: .NET pre-merge testing github iggy actions

inputs:
task:
description: "Task to run (lint, test, build, e2e)"
description: "Task to run (lint, test, build, e2e-<tfm>)"
required: true

runs:
Expand All @@ -30,10 +30,12 @@ runs:
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: "10.0.x"
dotnet-version: |
8.0.x
10.0.x
- name: Setup Rust with cache
if: inputs.task == 'test' || inputs.task == 'e2e'
if: inputs.task == 'test' || startsWith(inputs.task, 'e2e')
uses: ./.github/actions/utils/setup-rust-with-cache

- name: Restore dependencies
Expand Down Expand Up @@ -77,7 +79,7 @@ runs:

- name: Build Iggy server Docker image
id: docker_build
if: inputs.task == 'e2e'
if: startsWith(inputs.task, 'e2e')
shell: bash
run: |
cargo build --locked --bin iggy-server --bin iggy
Expand All @@ -91,14 +93,17 @@ runs:
echo "docker_image=iggy-server:test" >> "$GITHUB_OUTPUT"
- name: Run integration tests
if: inputs.task == 'e2e'
if: startsWith(inputs.task, 'e2e')
working-directory: foreign/csharp
env:
IGGY_SERVER_DOCKER_IMAGE: ${{ steps.docker_build.outputs.docker_image }}
IGGY_TEST_LOGS_DIR: ./reports/container-logs
IGGY_TEST_CLUSTER_NODES: "3"
IGGY_TASK: ${{ inputs.task }}
run: |
# Task name carries the target framework: e2e-net8.0 -> net8.0
dotnet test --project Iggy_SDK.Tests.Integration \
--framework "${IGGY_TASK#e2e-}" \
--no-build \
--verbosity normal \
--coverage \
Expand All @@ -109,15 +114,15 @@ runs:
shell: bash

- name: Collect container logs
if: inputs.task == 'e2e' && always()
if: startsWith(inputs.task, 'e2e') && always()
shell: bash
run: |
mkdir -p foreign/csharp/reports/container-logs
find foreign/csharp/Iggy_SDK.Tests.Integration/bin -name "*.log" -path "*/container-logs/*" -exec cp {} foreign/csharp/reports/container-logs/ \; || true
- name: Upload Test Results
uses: actions/upload-artifact@v7
if: inputs.task == 'e2e' && always()
if: startsWith(inputs.task, 'e2e') && always()
with:
name: dotnet-test-results-${{ inputs.task }}
path: foreign/csharp/reports
Expand Down
2 changes: 1 addition & 1 deletion .github/config/components.yml
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ components:
paths:
- "foreign/csharp/**"
- "examples/csharp/**"
tasks: ["lint", "test", "build", "e2e"]
tasks: ["lint", "test", "build", "e2e-net8.0", "e2e-net10.0"]

sdk-cpp:
depends_on:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ jobs:
override_pr: ${{ github.event.pull_request.number }}

- name: Upload C# coverage to Codecov
if: inputs.component == 'sdk-csharp' && (inputs.task == 'test' || inputs.task == 'e2e')
if: inputs.component == 'sdk-csharp' && (inputs.task == 'test' || startsWith(inputs.task, 'e2e'))
uses: codecov/codecov-action@v7.0.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
Expand Down
Loading