From 4d67c6c45457b0980d881adf861057635cb45970 Mon Sep 17 00:00:00 2001 From: vanguille Date: Fri, 7 Feb 2025 02:41:43 +1100 Subject: [PATCH] test --- .github/workflows/sonarcloud.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml index cde8e85..d465b4e 100644 --- a/.github/workflows/sonarcloud.yml +++ b/.github/workflows/sonarcloud.yml @@ -35,8 +35,9 @@ jobs: echo "SOLUTION_FILE=$SOLUTION_FILE" >> $GITHUB_ENV - name: Run tests with coverage - run: dotnet test "$SOLUTION_FILE" --collect:"XPlat Code Coverage" --logger trx --results-directory ./TestResults/ - + run: | + dotnet test "$SOLUTION_FILE" --collect:"XPlat Code Coverage" --logger trx --results-directory ./TestResults/ + - name: Upload test results (optional, for visibility) uses: actions/upload-artifact@v4 with: @@ -59,5 +60,7 @@ jobs: /d:sonar.verbose=true \ /d:sonar.host.url="${{ secrets.SONAR_HOST_URL }}" \ /d:sonar.login="${{ secrets.SONAR_TOKEN }}" - dotnet test "$SOLUTION_FILE" --no-build + + dotnet build "$SOLUTION_FILE" --configuration Debug + dotnet test "$SOLUTION_FILE" --no-build --collect:"XPlat Code Coverage" --logger trx --results-directory ./TestResults/ dotnet sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}"