Add Sonarqube #6
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: SonarQube Analysis | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| env: | |
| SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| jobs: | |
| build: | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: SonarScanner for .NET 9 with pull request decoration support | |
| uses: highbyte/[email protected] | |
| with: | |
| # The key of the SonarQube project | |
| sonarProjectKey: Psychoboy_PenguinTwitchBot | |
| # The name of the SonarQube project | |
| sonarProjectName: PenguinTwitchBot | |
| # The name of the SonarQube organization in SonarCloud. For hosted SonarQube, skip this setting. | |
| sonarOrganization: psychoboy | |
| dotnetBuildArguments: ./DotNetTwitchBot.sln | |
| # Optional command arguments to dotnet test | |
| dotnetTestArguments: --logger trx --collect:"XPlat Code Coverage" -- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=opencover | |
| # Optional extra command arguments the the SonarScanner 'begin' command | |
| sonarBeginArguments: /d:sonar.cs.opencover.reportsPaths="**/TestResults/**/coverage.opencover.xml" -d:sonar.cs.vstest.reportsPaths="**/TestResults/*.trx" | |