|
24 | 24 | SOLUTION_FILE: 'src/Steeltoe.All.sln' |
25 | 25 | TEST_OUTPUT_DIRECTORY: '${{ github.workspace }}/TestOutput' |
26 | 26 | SONAR_TEST_ARGS: >- |
27 | | - --no-build --no-progress --configuration Release --results-directory ${{ github.workspace }}/TestOutput |
28 | | - --report-trx --coverage --coverage-settings coverage.sonar.config |
| 27 | + --no-build --no-progress --configuration Release --results-directory '${{ github.workspace }}/TestOutput' |
| 28 | + --report-trx --coverage --coverage-settings coverage.config |
29 | 29 |
|
30 | 30 | jobs: |
31 | 31 | analyze: |
|
78 | 78 | # TODO: Revert to OpenCover, see https://github.com/microsoft/testfx/issues/7104 |
79 | 79 | # /d:sonar.cs.opencover.reportsPaths=**/coverage.opencover.xml |
80 | 80 | dotnet sonarscanner begin /k:"SteeltoeOSS_steeltoe" /o:"steeltoeoss" /d:sonar.token="${{ secrets.SONAR_TOKEN }}" |
81 | | - /d:sonar.host.url="https://sonarcloud.io" /d:sonar.cs.vscoveragexml.reportsPaths="${{ env.TEST_OUTPUT_DIRECTORY }}/*.xml" |
| 81 | + /d:sonar.host.url="https://sonarcloud.io" /d:sonar.coverageReportPaths=TestOutput/SonarQube.xml |
82 | 82 |
|
83 | 83 | - name: Build solution |
84 | 84 | run: dotnet build ${{ env.SOLUTION_FILE }} --no-restore --configuration Release --verbosity minimal |
|
89 | 89 | - name: Test (memory dumps) |
90 | 90 | run: dotnet test --project src/Management/test/Endpoint.Test/Steeltoe.Management.Endpoint.Test.csproj --filter-trait "Category=MemoryDumps" ${{ env.SONAR_TEST_ARGS }} |
91 | 91 |
|
| 92 | + - name: 'TEMP: List files before coverage conversion' |
| 93 | + run: find ${{ env.TEST_OUTPUT_DIRECTORY }} |
| 94 | + |
| 95 | + - name: Convert Cobertura to Sonar format using ReportGenerator |
| 96 | + uses: danielpalme/[email protected] |
| 97 | + with: |
| 98 | + reports: '${{ env.TEST_OUTPUT_DIRECTORY }}/*cobertura.xml' |
| 99 | + targetdir: '${{ env.TEST_OUTPUT_DIRECTORY }}' |
| 100 | + reporttypes: 'SonarQube' |
| 101 | + filefilters: '-*.g.cs' |
| 102 | + |
| 103 | + - name: 'TEMP: List files after coverage conversion' |
| 104 | + run: find ${{ env.TEST_OUTPUT_DIRECTORY }} |
| 105 | + |
92 | 106 | - name: End Sonar .NET scanner |
93 | 107 | if: ${{ !cancelled() && steps.sonar_begin.outcome == 'success' }} |
94 | 108 | env: |
|
0 commit comments