Skip to content

Commit

Permalink
Added test results.
Browse files Browse the repository at this point in the history
  • Loading branch information
idubnori committed Sep 16, 2018
1 parent fb669d7 commit 1c8f52a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
6 changes: 6 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ steps:
./build.sh --target=All
displayName: Run Cake build

- task: PublishTestResults@2
inputs:
testResultsFormat: 'xUnit'
testResultsFiles: '**/TestResults*.xml'
displayName: Publish test results

# - script: dotnet build --configuration $(buildConfiguration)
# displayName: 'dotnet build $(buildConfiguration)'
- script: |
Expand Down
8 changes: 7 additions & 1 deletion build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,16 @@ Task("Test")
.IsDependentOn("Build")
.Does(() =>
{
var settings = new DotNetCoreTestSettings
{
// Outputing test results as XML so that VSTS can pick it up
ArgumentCustomization = args => args.Append("--logger \"trx;LogFileName=TestResults.xml\"")
};
var projectFiles = GetFiles("./tests/**/*.csproj");
foreach(var file in projectFiles)
{
DotNetCoreTest(file.FullPath);
DotNetCoreTest(file.FullPath, settings);
}
})
Expand Down

0 comments on commit 1c8f52a

Please sign in to comment.