Skip to content

Commit 9e1cc0f

Browse files
committed
gh-65 add sonarqube unit test report path
Signed-off-by: Victor Chang <[email protected]>
1 parent e9bab86 commit 9e1cc0f

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,9 @@ jobs:
145145
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
146146
shell: powershell
147147
run: |
148-
.\.sonar\scanner\dotnet-sonarscanner begin /k:"Project-MONAI_monai-deploy-informatics-gateway" /o:"project-monai" /d:sonar.login="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io"
148+
.\.sonar\scanner\dotnet-sonarscanner begin /k:"Project-MONAI_monai-deploy-informatics-gateway" /o:"project-monai" /d:sonar.login="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.cs.opencover.reportsPaths="src\${{ env.TEST_RESULTS }}\**\*.xml"
149149
dotnet build -c ${{ env.BUILD_CONFIG }} --nologo "src\${{ env.SOLUTION }}"
150-
dotnet test --filter FullyQualifiedName\!~Monai.Deploy.InformaticsGateway.Integration.Test -c ${{ env.BUILD_CONFIG }} -v=minimal --results-directory "src\${{ env.TEST_RESULTS }}" --collect:"XPlat Code Coverage" --settings src\coverlet.runsettings "src\${{ env.SOLUTION }}"
150+
dotnet test --no-build --filter FullyQualifiedName\!~Monai.Deploy.InformaticsGateway.Integration.Test -c ${{ env.BUILD_CONFIG }} -v=minimal --results-directory "src\${{ env.TEST_RESULTS }}" --collect:"XPlat Code Coverage" --settings src\coverlet.runsettings "src\${{ env.SOLUTION }}"
151151
.\.sonar\scanner\dotnet-sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}"
152152
153153
- uses: codecov/codecov-action@v2

src/Client/InformaticsGatewayClient.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public void ConfigureServiceUris(Uri uriRoot)
5757
Guard.Against.MalformUri(uriRoot, nameof(uriRoot));
5858

5959
_httpClient.BaseAddress = uriRoot;
60-
_logger.Log(LogLevel.Debug, $"Service URI set to {uriRoot}");
60+
_logger?.Log(LogLevel.Debug, $"Base address set to {uriRoot}");
6161
}
6262

6363
/// <inheritdoc/>

src/DicomWebClient/DicomWebClient.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public void ConfigureServiceUris(Uri uriRoot)
6161

6262
_httpClient.BaseAddress = uriRoot;
6363

64-
_logger.Log(LogLevel.Debug, $"Base address set to {uriRoot}");
64+
_logger?.Log(LogLevel.Debug, $"Base address set to {uriRoot}");
6565
}
6666

6767
/// <inheritdoc/>

src/InformaticsGateway/Test/Common/DicomExtensionsTest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,15 +73,15 @@ public void ToDicomTransferSyntaxArrayWithEmptyList()
7373

7474
var result = uids.ToDicomTransferSyntaxArray();
7575

76-
Assert.Null(result);
76+
Assert.Empty(result);
7777
}
7878

7979
[Fact(DisplayName = "DicomExtensions.ToDicomTransferSyntaxArray test with null input")]
8080
public void ToDicomTransferSyntaxArrayWithNullInput()
8181
{
8282
var result = DicomExtensions.ToDicomTransferSyntaxArray(null);
8383

84-
Assert.Null(result);
84+
Assert.Empty(result);
8585
}
8686
}
8787
}

0 commit comments

Comments
 (0)