Update README.md #53
This file contains 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: SonarCloud | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
workflow_dispatch: | |
jobs: | |
sonarcloud-processing: | |
name: "SonarCloud" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
with: | |
fetch-depth: 0 | |
- name: Setup .NET 5 | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: 5.0.x | |
- name: Setup .NET CORE | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: '3.1.x' | |
- name: Restore dependencies | |
run: dotnet restore OnixDataStandard.sln | |
- name: Sonarqube Begin Scan | |
run: | | |
dotnet tool install --global dotnet-sonarscanner | |
dotnet sonarscanner begin /o:"${{ secrets.SONAR_ORG }}" /k:"${{ secrets.SONAR_PROJECT }}" /d:sonar.login="${{ secrets.SONAR_TOKEN }}" /d:sonar.cs.opencover.reportsPaths="**/coverage.opencover.xml" /d:sonar.cs.vstest.reportsPaths="**/*.trx" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.exclusions="**/Samples/**" /d:sonar.coverage.exclusions="**/OnixData.Standard.Benchmarks/**" | |
- name: Build | |
run: dotnet build OnixDataStandard.sln --no-restore | |
- name: Test | |
run: dotnet test OnixDataStandard.sln --no-build --verbosity normal --logger trx /p:CollectCoverage=true /p:CoverletOutput=TestResults/ /p:CoverletOutputFormat=opencover | |
/p:Exclude=\"[OnixData.Standard.BaseTests]*\" /p:ExcludeByAttribute=\"Obsolete,GeneratedCodeAttribute,CompilerGeneratedAttribute\" | |
- name: Sonarqube End Scan | |
run: dotnet sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |