Skip to content

Commit

Permalink
Updated to enable SonarCloud integration
Browse files Browse the repository at this point in the history
  • Loading branch information
StevenJDH committed Nov 30, 2024
1 parent 44febae commit 1854497
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/dotnet-action-sonar-container-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,16 +83,16 @@ jobs:
run: dotnet restore

- name: Build, Test, and Analyze
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any.
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any.
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: |
# ~/.sonar/scanner/dotnet-sonarscanner begin /k:StevenJDH_maven-version-checker /o:stevenjdh /d:sonar.token=$SONAR_TOKEN /d:sonar.host.url="https://sonarcloud.io" \
# /d:sonar.cs.opencover.reportsPaths="**/TestResults/*/coverage.opencover.xml" /d:sonar.cs.vstest.reportsPaths="**/TestResults/*.trx" /d:sonar.language=cs \
# /d:sonar.scanner.scanAll=false
~/.sonar/scanner/dotnet-sonarscanner begin /k:StevenJDH_maven-version-checker /o:stevenjdh /d:sonar.token=$SONAR_TOKEN /d:sonar.host.url="https://sonarcloud.io" \
/d:sonar.cs.opencover.reportsPaths="**/TestResults/*/coverage.opencover.xml" /d:sonar.cs.vstest.reportsPaths="**/TestResults/*.trx" /d:sonar.language=cs \
/d:sonar.scanner.scanAll=false
dotnet build --configuration Debug --no-restore
dotnet test --configuration Debug --no-build --verbosity normal --collect:"XPlat Code Coverage" --logger trx -- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=opencover
# ~/.sonar/scanner/dotnet-sonarscanner end /d:sonar.token=$SONAR_TOKEN
~/.sonar/scanner/dotnet-sonarscanner end /d:sonar.token=$SONAR_TOKEN
- name: Set Release Mode
id: release
Expand Down

0 comments on commit 1854497

Please sign in to comment.