From bee4bf60ee5df9d2e1e32418af1e6de9abd89001 Mon Sep 17 00:00:00 2001 From: Hertzole Date: Fri, 10 Jan 2025 15:37:46 +0100 Subject: [PATCH] ci: generate coverage report before sonarqube --- .github/workflows/tests.yml | 38 ++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d9055a9..75a7498 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -93,27 +93,14 @@ jobs: dotnet-version: | 8.x - - name: Install Java - uses: actions/setup-java@v4 - with: - distribution: 'temurin' - java-version: '21' + # - name: Install Java + # uses: actions/setup-java@v4 + # with: + # distribution: 'temurin' + # java-version: '21' - name: Install scanner - run: dotnet tool install dotnet-sonarscanner --tool-path . --version 6.0.0 - - - name: Activate Unity - continue-on-error: true - env: - UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} - run: | - echo "$UNITY_LICENSE" | tr -d '\r' > License.ulf - unity-editor -nographics -logFile /dev/stdout -manualLicenseFile License.ulf -quit - - - name: Generate Solution - run: | - unity-editor -nographics -logFile /dev/stdout -customBuildName scriptable-values -projectPath . -executeMethod Packages.Rider.Editor.RiderScriptEditor.SyncSolution -quit - ls + run: dotnet tool install dotnet-sonarscanner --tool-path . # Download the coverage results - name: Download coverage results @@ -135,6 +122,19 @@ jobs: name: coverage-report path: CoverageReport + - name: Activate Unity + continue-on-error: true + env: + UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} + run: | + echo "$UNITY_LICENSE" | tr -d '\r' > License.ulf + unity-editor -nographics -logFile /dev/stdout -manualLicenseFile License.ulf -quit + + - name: Generate Solution + run: | + unity-editor -nographics -logFile /dev/stdout -customBuildName scriptable-values -projectPath . -executeMethod Packages.Rider.Editor.RiderScriptEditor.SyncSolution -quit + ls + # The test results have a different path than what SonarQube can read. # We need to remove the github/workspace/ path. - name: Fix paths