bugfix: add tests for workflow return values and fix null handling #214
Workflow file for this run
This file contains 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: Build_And_UnitTest | |
on: | |
push: | |
branches: [dev, main, "feat/**"] | |
pull_request: | |
branches: [dev, main] | |
jobs: | |
linux: | |
name: build on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [windows-latest, ubuntu-latest] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup .NET SDK | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: | | |
8.0.x | |
- name: Show dotnet Version | |
run: | | |
dotnet --list-sdks | |
dotnet --list-runtimes | |
- name: Build with dotnet | |
run: | | |
dotnet build DtmClient.sln | |
# - name: Run tests on netcoreapp3.1 | |
# run: | | |
# dotnet test --framework=netcoreapp3.1 tests/Dtmcli.Tests/Dtmcli.Tests.csproj | |
# dotnet test --framework=netcoreapp3.1 tests/Dtmgrpc.Tests/Dtmgrpc.Tests.csproj | |
# dotnet test --framework=netcoreapp3.1 tests/Dtmworkflow.Tests/Dtmworkflow.Tests.csproj | |
# - name: Run tests on net6.0 | |
# run: | | |
# dotnet test --framework=net6.0 tests/Dtmcli.Tests/Dtmcli.Tests.csproj --collect:"XPlat Code Coverage" | |
# dotnet test --framework=net6.0 tests/Dtmgrpc.Tests/Dtmgrpc.Tests.csproj --collect:"XPlat Code Coverage" | |
# dotnet test --framework=net6.0 tests/Dtmworkflow.Tests/Dtmworkflow.Tests.csproj --collect:"XPlat Code Coverage" | |
- name: Run tests on net8.0 | |
run: | | |
dotnet test --framework=net8.0 tests/Dtmcli.Tests/Dtmcli.Tests.csproj --collect:"XPlat Code Coverage" | |
dotnet test --framework=net8.0 tests/Dtmgrpc.Tests/Dtmgrpc.Tests.csproj --collect:"XPlat Code Coverage" | |
dotnet test --framework=net8.0 tests/Dtmworkflow.Tests/Dtmworkflow.Tests.csproj --collect:"XPlat Code Coverage" | |
- name: Prepare Codecov | |
continue-on-error: true | |
run: | | |
mkdir ${{ github.workspace }}/coverage/ | |
cp ${{ github.workspace }}/tests/Dtmcli.Tests/TestResults/*/coverage.cobertura.xml ${{ github.workspace }}/coverage/cli.xml | |
cp ${{ github.workspace }}/tests/Dtmgrpc.Tests/TestResults/*/coverage.cobertura.xml ${{ github.workspace }}/coverage/grpc.xml | |
cp ${{ github.workspace }}/tests/Dtmworkflow.Tests/TestResults/*/coverage.cobertura.xml ${{ github.workspace }}/coverage/wf.xml | |
ls ${{ github.workspace }}/coverage/ | |
- name: Upload coverage to Codecov | |
if: ${{ matrix.os == 'ubuntu-latest' }} | |
uses: codecov/codecov-action@v5 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
fail_ci_if_error: true | |
files: ${{ github.workspace }}/coverage/cli.xml,${{ github.workspace }}/coverage/grpc.xml,${{ github.workspace }}/coverage/wf.xml | |
name: codecov-dtm-client-csharp | |
verbose: true |