fix(sdk): 审查发现修复——schemadiff 枚举方向按数据流判定 + manifest 上传 fire-and-forget #149
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |