@@ -130,10 +130,10 @@ jobs:
130130 with :
131131 setAllVars : true
132132
133- # - name: Setting VERSION and BRANCH env
134- # run: |
135- # echo "::set-env name=VERSION::$NBGV_NuGetPackageVersion"
136- # echo "::set-env name=BRANCH::$(echo ${GITHUB_REF#refs/heads/} | sed 's/\//_/g')"
133+ - name : Setting VERSION and BRANCH env
134+ run : |
135+ echo "::set-env name=VERSION::$NBGV_NuGetPackageVersion"
136+ echo "::set-env name=BRANCH::$(echo ${GITHUB_REF#refs/heads/} | sed 's/\//_/g')"
137137
138138 - uses : actions/setup-dotnet@v1
139139 with :
@@ -142,37 +142,19 @@ jobs:
142142 with :
143143 dotnet-version : ' 5.0.100-rc.1.20452.10'
144144
145- # - name: Install dotnet-sonarscanner
146- # run: dotnet tool install --global dotnet-sonarscanner
147- # - name: Running dotnet-sonarscanner
148- # shell: bash
149- # env:
150- # SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
151- # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
152- # run: |
153- # dotnet sonarscanner begin /k:"egil_bUnit" /o:"egil" /n:"bUnit" /v:"$NBGV_NuGetPackageVersion" /d:sonar.login="$SONAR_TOKEN" /d:sonar.host.url=https://sonarcloud.io /d:sonar.branch.name="$BRANCH"
154- # dotnet build /p:UseSourceLink=true
155- # dotnet test --no-build /p:CollectCoverage=true /p:CoverletOutput=./coverage/ /p:CoverletOutputFormat=opencover /p:ExcludeByAttribute=\"Obsolete,GeneratedCodeAttribute,CompilerGeneratedAttribute\" /p:UseSourceLink=true
156- # dotnet sonarscanner end /d:sonar.login="$SONAR_TOKEN"
157- - name : Sonarscanner for dotnet
158- uses : Secbyte/dotnet-sonarscanner@v2.3
159- with :
160- buildCommand : dotnet build .
161- testCommand : dotnet test .
162- projectKey : egil_bUnit
163- projectName : bUnit
164- sonarOrganisation : egil
165- beginArguments : >
166- /d:sonar.verbose="true"
167- /d:sonar.cs.opencover.reportsPaths="tests/**/coverage/*.opencover.xml"
168- /d:sonar.coverage.exclusions='"**/*.cs","**/*.md"'
145+ - name : Install dotnet-sonarscanner
146+ run : dotnet tool install --global dotnet-sonarscanner
147+ - name : Running dotnet-sonarscanner
148+ shell : bash
169149 env :
170150 SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
171151 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
152+ run : |
153+ dotnet sonarscanner begin /k:"egil_bUnit" /o:"egil" /n:"bUnit" /v:"$NBGV_NuGetPackageVersion" /d:sonar.login="$SONAR_TOKEN" /d:sonar.host.url=https://sonarcloud.io /d:sonar.branch.name="$BRANCH" /d:sonar.verbose="true" /d:sonar.cs.opencover.reportsPaths="tests/**/coverage/*.opencover.xml"
154+ dotnet build
155+ dotnet test /p:CollectCoverage=true /p:CoverletOutput=./coverage/ /p:CoverletOutputFormat=opencover /p:ExcludeByAttribute=\"Obsolete,GeneratedCodeAttribute,CompilerGeneratedAttribute\"
156+ dotnet sonarscanner end /d:sonar.login="$SONAR_TOKEN"
172157
173- # /d:sonar.cs.opencover.reportsPaths='"/path/to/coverage.xml","/path/to/coverage.2.xml"'
174- # /v:"$NBGV_NuGetPackageVersion"
175- # /d:sonar.branch.name="$BRANCH"
176158 code-ql :
177159 if : github.event_name != 'pull_request'
178160 runs-on : ubuntu-latest
0 commit comments