From 6cc6b0abbc960b131c6cc23f56f579210d4b5024 Mon Sep 17 00:00:00 2001 From: Jamie Rees Date: Thu, 11 Apr 2019 16:17:42 +0100 Subject: [PATCH] upload test results --- appveyor.yml | 6 +++++- build.cake | 13 +++++++++++-- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 9ab4cafc4..1d73aefae 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -48,7 +48,11 @@ after_build: appveyor PushArtifact "%APPVEYOR_BUILD_FOLDER%\src\Ombi\bin\Release\netcoreapp2.2\linux-arm64.tar.gz" - + +- ps: >- + $wc = New-Object 'System.Net.WebClient' + + $wc.UploadFile("https://ci.appveyor.com/api/testresults/xunit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\src\**\TestResults\Test*.trx)) #cache: diff --git a/build.cake b/build.cake index d9c4601ef..44c994665 100644 --- a/build.cake +++ b/build.cake @@ -251,8 +251,17 @@ Task("Publish-Linux-ARM-64Bit") Task("Run-Unit-Tests") .Does(() => -{ - DotNetCoreTest(projDir); +{ + var settings = new DotNetCoreTestSettings + { + ArgumentCustomization = args => args.Append("--logger \"trx;LogFileName=Test.trx\""), + Configuration = "Release" + }; + var projectFiles = GetFiles("./**/*Tests.csproj"); + foreach(var file in projectFiles) + { + DotNetCoreTest(file.FullPath, settings); + } }); ////////////////////////////////////////////////////////////////////// // TASK TARGETS