Skip to content

fix(sdks): C++/C# demo 契约补齐——collection_query 函数不再落 action fallback #142

fix(sdks): C++/C# demo 契约补齐——collection_query 函数不再落 action fallback

fix(sdks): C++/C# demo 契约补齐——collection_query 函数不再落 action fallback #142

Workflow file for this run

name: CI - C# SDK
on:
workflow_dispatch:
push:
branches: [main]
paths:
- "sdks/csharp/**"
- ".github/workflows/ci-sdk-csharp.yml"
- ".github/scripts/normalize_csharp_coverage.py"
- "codecov.yml"
pull_request:
branches: [main]
paths:
- "sdks/csharp/**"
- ".github/workflows/ci-sdk-csharp.yml"
- ".github/scripts/normalize_csharp_coverage.py"
- "codecov.yml"
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v7
- uses: actions/setup-dotnet@v6
with:
dotnet-version: "10.0"
- run: dotnet build --configuration Release
working-directory: sdks/csharp
- run: |
dotnet test --nologo --no-build --no-restore \
--configuration Release \
--settings coverlet.runsettings.xml \
--collect:"XPlat Code Coverage" \
--results-directory ./TestResults
working-directory: sdks/csharp
- name: Normalize coverage paths for Codecov
run: python3 .github/scripts/normalize_csharp_coverage.py
- name: Verify C# coverage contains repo-relative SDK paths
run: |
test -f "sdks/csharp/TestResults/codecov/coverage.xml"
grep -q 'filename="sdks/csharp/src/Croupier.Sdk/' "sdks/csharp/TestResults/codecov/coverage.xml"
- uses: codecov/codecov-action@v7
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: sdks/csharp/TestResults/codecov/coverage.xml
flags: csharp-sdk
disable_search: true
fail_ci_if_error: true