diff --git a/.github/workflows/build-and_test.yml b/.github/workflows/build-and_test.yml index 2e2e76d..b305370 100644 --- a/.github/workflows/build-and_test.yml +++ b/.github/workflows/build-and_test.yml @@ -31,7 +31,9 @@ jobs: run: dotnet restore ${{ env.solutionName }} - name: Build run: dotnet build ${{ env.solutionName }} --no-restore -c Debug /p:UseSharedCompilation=false - - name: Test - run: dotnet test ${{ env.solutionName }} --no-build --verbosity normal -c Debug /p:CollectCoverage=true /p:CoverletOutput=TestResults/ /p:CoverletOutputFormat=opencover + - name: Test for net462 + run: dotnet test ${{ env.solutionName }} --no-build --verbosity normal -c Debug --framework net462 + - name: Test for net8.0 and collect coverage + run: dotnet test ${{ env.solutionName }} --no-build --verbosity normal -c Debug /p:CollectCoverage=true /p:CoverletOutput=TestResults/ /p:CoverletOutputFormat=opencover --framework net8.0 - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v3 diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml index daf47d0..d95e204 100644 --- a/.github/workflows/sonarcloud.yml +++ b/.github/workflows/sonarcloud.yml @@ -76,5 +76,5 @@ jobs: ./.sonar/scanner/dotnet-sonarscanner begin /k:"microsoft_kiota-http-dotnet" /o:"microsoft" /d:sonar.login="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.cs.opencover.reportsPaths="Microsoft.Kiota.Http.HttpClientLibrary.Tests/coverage.net8.0.opencover.xml" dotnet workload restore dotnet build - dotnet test Microsoft.Kiota.Http.HttpClientLibrary.sln --no-build --verbosity normal /p:CollectCoverage=true /p:CoverletOutputFormat=opencover + dotnet test Microsoft.Kiota.Http.HttpClientLibrary.sln --no-build --verbosity normal /p:CollectCoverage=true /p:CoverletOutputFormat=opencover --framework net8.0 ./.sonar/scanner/dotnet-sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}" \ No newline at end of file diff --git a/Microsoft.Kiota.Http.HttpClientLibrary.Tests/Microsoft.Kiota.Http.HttpClientLibrary.Tests.csproj b/Microsoft.Kiota.Http.HttpClientLibrary.Tests/Microsoft.Kiota.Http.HttpClientLibrary.Tests.csproj index 9b7d43b..1a944d7 100644 --- a/Microsoft.Kiota.Http.HttpClientLibrary.Tests/Microsoft.Kiota.Http.HttpClientLibrary.Tests.csproj +++ b/Microsoft.Kiota.Http.HttpClientLibrary.Tests/Microsoft.Kiota.Http.HttpClientLibrary.Tests.csproj @@ -11,7 +11,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive