diff --git a/.github/workflows/dotnet-build.yml b/.github/workflows/dotnet-build.yml index 8539502b9e3..03b990fdc09 100644 --- a/.github/workflows/dotnet-build.yml +++ b/.github/workflows/dotnet-build.yml @@ -80,16 +80,15 @@ jobs: run: | echo "Build AutoGen" dotnet build --no-restore --configuration Release -bl /p:SignAssembly=true - - name: Unit Test V1 - run: dotnet test --no-build -bl --configuration Release --filter "Category=UnitV1" - - name: Unit Test V2 (With Coverage) - run: dotnet test --no-build -bl --configuration Release --filter "Category=UnitV2" --collect:"XPlat Code Coverage" + - name: Non-GRPC Tests (macos) + if: matrix.os == 'macos-latest' + run: dotnet test --no-build -bl --configuration Release --filter "Category=UnitV1|Category=UnitV2" - name: Install Dev Certs for GRPC if: matrix.os == 'ubuntu-latest' run: dotnet dev-certs https --trust - - name: GRPC Tests (With Coverage) + - name: All Unit Tests With Coverage (ubuntu) if: matrix.os == 'ubuntu-latest' - run: dotnet test --no-build -bl --configuration Release --filter "Category=GRPC" --collect:"XPlat Code Coverage" + run: dotnet test --no-build -bl --configuration Release --filter "Category=UnitV1|Category=UnitV2|Category=GRPC" --collect:"XPlat Code Coverage" - name: Generate & Merge Coverage Report if: matrix.os == 'ubuntu-latest' run: | @@ -97,12 +96,12 @@ jobs: dotnet tool install -g dotnet-reportgenerator-globaltool || dotnet tool update -g dotnet-reportgenerator-globaltool # Ensure output directory exists mkdir -p ${{ github.workspace }}/dotnet/coverage-report - # Merge all coverage reports and generate HTML + XML + # Merge all coverage reports reportgenerator \ -reports:${{ github.workspace }}/dotnet/**/TestResults/**/coverage.cobertura.xml \ -targetdir:${{ github.workspace }}/dotnet/coverage-report \ - -reporttypes:"Cobertura;Html" - ls -R ${{ github.workspace }}/dotnet/coverage-report + -reporttypes:"Cobertura;Html" \ + -sourcedirs:${{ github.workspace }}/dotnet/src # filter only dotnet/src - name: Upload Merged Coverage Report if: matrix.os == 'ubuntu-latest' uses: actions/upload-artifact@v4 diff --git a/dotnet/Directory.Build.props b/dotnet/Directory.Build.props index d5610362a77..d160f5f62b3 100644 --- a/dotnet/Directory.Build.props +++ b/dotnet/Directory.Build.props @@ -39,6 +39,10 @@ + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + diff --git a/dotnet/test/Microsoft.AutoGen.Core.Grpc.Tests/Microsoft.AutoGen.Core.Grpc.Tests.csproj b/dotnet/test/Microsoft.AutoGen.Core.Grpc.Tests/Microsoft.AutoGen.Core.Grpc.Tests.csproj index 4f67d972782..e3573c93451 100644 --- a/dotnet/test/Microsoft.AutoGen.Core.Grpc.Tests/Microsoft.AutoGen.Core.Grpc.Tests.csproj +++ b/dotnet/test/Microsoft.AutoGen.Core.Grpc.Tests/Microsoft.AutoGen.Core.Grpc.Tests.csproj @@ -8,10 +8,6 @@ - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - diff --git a/dotnet/test/Microsoft.AutoGen.Core.Tests/Microsoft.AutoGen.Core.Tests.csproj b/dotnet/test/Microsoft.AutoGen.Core.Tests/Microsoft.AutoGen.Core.Tests.csproj index eed47c6238b..29165739b63 100644 --- a/dotnet/test/Microsoft.AutoGen.Core.Tests/Microsoft.AutoGen.Core.Tests.csproj +++ b/dotnet/test/Microsoft.AutoGen.Core.Tests/Microsoft.AutoGen.Core.Tests.csproj @@ -8,10 +8,6 @@ - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - diff --git a/dotnet/test/Microsoft.AutoGen.Integration.Tests/Microsoft.AutoGen.Integration.Tests.csproj b/dotnet/test/Microsoft.AutoGen.Integration.Tests/Microsoft.AutoGen.Integration.Tests.csproj index 320aa44decc..95f519fd5ae 100644 --- a/dotnet/test/Microsoft.AutoGen.Integration.Tests/Microsoft.AutoGen.Integration.Tests.csproj +++ b/dotnet/test/Microsoft.AutoGen.Integration.Tests/Microsoft.AutoGen.Integration.Tests.csproj @@ -10,7 +10,6 @@ - runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/dotnet/test/Microsoft.AutoGen.Runtime.Grpc.Tests/Microsoft.AutoGen.Runtime.Grpc.Tests.csproj b/dotnet/test/Microsoft.AutoGen.Runtime.Grpc.Tests/Microsoft.AutoGen.Runtime.Grpc.Tests.csproj index c8b00ee268b..ab0899c0f16 100644 --- a/dotnet/test/Microsoft.AutoGen.Runtime.Grpc.Tests/Microsoft.AutoGen.Runtime.Grpc.Tests.csproj +++ b/dotnet/test/Microsoft.AutoGen.Runtime.Grpc.Tests/Microsoft.AutoGen.Runtime.Grpc.Tests.csproj @@ -8,10 +8,6 @@ - - runtime; build; native; contentfiles; analyzers; buildtransitive - all -