Added xunit logger and configured pipeline for publishing.

This commit is contained in:
Harrison Deng 2022-04-25 02:40:03 -05:00
parent f2c297fd88
commit 2069b38dbd
3 changed files with 6 additions and 2 deletions

6
Jenkinsfile vendored
View File

@ -11,7 +11,8 @@ pipeline {
} }
stage("Test") { stage("Test") {
steps { steps {
dotnetTest noRestore: true, project: "Props.Shop/Props.Shop.Tests.sln", unstableIfErrors: true, unstableIfWarnings: true dotnetTest logger: 'xunit', noRestore: true, project: 'Props.Shop/Props.Shop.Tests.sln', unstableIfErrors: true, unstableIfWarnings: true
xunit([xUnitDotNet(excludesPattern: '', pattern: 'Props.Shop/*.Tests/TestReports/*.xml', stopProcessingIfError: true)])
} }
} }
stage("Publish") { stage("Publish") {
@ -34,7 +35,8 @@ pipeline {
} }
stage("Test") { stage("Test") {
steps { steps {
dotnetTest noRestore: true, project: "Props.Tests", unstableIfErrors: true, unstableIfWarnings: true dotnetTest logger: 'xunit', noRestore: true, project: 'Props.Tests', unstableIfErrors: true, unstableIfWarnings: true
xunit([xUnitDotNet(excludesPattern: '', pattern: 'Props.Tests/TestReports/*.xml', stopProcessingIfError: true)])
} }
} }
stage("Publish") { stage("Publish") {

View File

@ -20,6 +20,7 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets> <PrivateAssets>all</PrivateAssets>
</PackageReference> </PackageReference>
<PackageReference Include="XunitXml.TestLogger" Version="3.0.70" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View File

@ -18,6 +18,7 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets> <PrivateAssets>all</PrivateAssets>
</PackageReference> </PackageReference>
<PackageReference Include="XunitXml.TestLogger" Version="3.0.70" />
</ItemGroup> </ItemGroup>
</Project> </Project>