From 630487798bbdfe3b702b3c89cf89b22917a9c2d6 Mon Sep 17 00:00:00 2001 From: Ted Spence Date: Sun, 10 Sep 2023 18:10:34 -0700 Subject: [PATCH 1/2] Update dotnet.yml This PR removes sonar scanner from the github action. From recent experience, I believe Sonar works better on its own. This means we lose the official code coverage numbers from Sonar but I'll live with that. --- .github/workflows/dotnet.yml | 28 +++++----------------------- 1 file changed, 5 insertions(+), 23 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 3516058..acb4ed3 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -16,31 +16,13 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v1 with: - dotnet-version: 6.0.x - - name: Check Environment Variables (RUNNER_TEMP) - run: echo "Runner Temp is ${{env.RUNNER_TEMP}}" - - name: Check Environment Variables (TMP) - env: - TMP: ${{env.RUNNER_TEMP}} - run: echo "DotNet TMP is ${{env.TMP}}" + dotnet-version: 7.0.x - name: Restore run: dotnet restore - - name: SonarCloud Install - run: - dotnet tool update dotnet-sonarscanner --tool-path /tmp/sonar - - name: Coverage Install - run: - dotnet tool update dotnet-coverage --tool-path /tmp/coverage - - name: SonarCloud Start - run: - /tmp/sonar/dotnet-sonarscanner begin /k:"tspence_csharp-searchlight" /o:"tspence" /d:sonar.login="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.cs.vscoveragexml.reportsPaths=coverage.xml - name: Build run: dotnet build - name: Test - env: - TMP: /tmp - run: - /tmp/coverage/dotnet-coverage collect "dotnet test" -f xml -o "coverage.xml" - - name: SonarCloud End - run: - /tmp/sonar/dotnet-sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}" + run: dotnet test + + # We no longer use SonarCloud here; SonarCloud does automated scanning instead. + # This means we don't get code coverage but it is much faster and simpler. From fd79d9e2e7ffb626ba70cfdc07bd08cd9d3b7e59 Mon Sep 17 00:00:00 2001 From: Ted Spence Date: Sun, 10 Sep 2023 18:17:26 -0700 Subject: [PATCH 2/2] Move tests to DotNet 7 --- src/SearchlightPerformance/SearchlightPerformance.csproj | 2 +- tests/Searchlight.Tests/Searchlight.Tests.csproj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/SearchlightPerformance/SearchlightPerformance.csproj b/src/SearchlightPerformance/SearchlightPerformance.csproj index c1c9476..68d2788 100644 --- a/src/SearchlightPerformance/SearchlightPerformance.csproj +++ b/src/SearchlightPerformance/SearchlightPerformance.csproj @@ -1,7 +1,7 @@ - net6.0 + net7.0 disable perftest Exe diff --git a/tests/Searchlight.Tests/Searchlight.Tests.csproj b/tests/Searchlight.Tests/Searchlight.Tests.csproj index 331f8bb..a4dc112 100644 --- a/tests/Searchlight.Tests/Searchlight.Tests.csproj +++ b/tests/Searchlight.Tests/Searchlight.Tests.csproj @@ -4,7 +4,7 @@ false - net6.0 + net7.0