try again #12
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: checkout all the submodules | |
| uses: actions/checkout@v2 | |
| with: | |
| submodules: recursive | |
| - uses: actions/checkout@v3 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v3 | |
| with: | |
| dotnet-version: 9.0.x | |
| submodules: 'true' | |
| - name: Restore dependencies | |
| run: dotnet restore | |
| - name: Install dotnet-coverage | |
| run: dotnet tool install -g dotnet-coverage | |
| - name: Install SonarScanner | |
| run: dotnet tool install --global dotnet-sonarscanner | |
| - name: Begin SonarQube | |
| run: dotnet sonarscanner begin /o:"psychoboy" /k:"Psychoboy_PenguinTwitchBot" /d:sonar.login="${{ secrets.SONAR_TOKEN }}" /d:sonar.cs.vscoveragexml.reportsPaths=coverage.xml | |
| - name: Build | |
| run: dotnet build --no-incremental | |
| - name: Test | |
| run: dotnet-coverage collect 'dotnet test' -f xml -o 'coverage.xml' | |
| - name: End SonarQube | |
| run: dotnet sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}" | |