From 198df72052bea80710dcf095ad6e980acf7fd2e5 Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Mon, 8 Jan 2024 20:14:16 +0100 Subject: [PATCH] add GithubActions test logger --- build/scripts/Targets.fs | 7 ++++++- tests/Directory.Build.props | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/build/scripts/Targets.fs b/build/scripts/Targets.fs index bc7885d..33c99a1 100644 --- a/build/scripts/Targets.fs +++ b/build/scripts/Targets.fs @@ -45,9 +45,14 @@ let private test _ = let junitOutput = Path.Combine(testOutputPath.FullName, "junit-{assembly}-{framework}-test-results.xml") let loggerPathArgs = $"LogFilePath=%s{junitOutput}" let loggerArg = $"--logger:\"junit;%s{loggerPathArgs}\"" + let githubActionsLogger = $"--logger:\"GitHubActions:summary.includePassedTests\"" let tfmArgs = if OS.Current = OS.Windows then [] else ["-f"; "net8.0"] exec { - run "dotnet" (["test"; "-c"; "Release"; loggerArg] @ tfmArgs) + run "dotnet" ( + ["test"; "-c"; "Release"; loggerArg; githubActionsLogger] + @ tfmArgs + @ ["--"; "RunConfiguration.CollectSourceInformation=true"] + ) } let private validatePackages _ = diff --git a/tests/Directory.Build.props b/tests/Directory.Build.props index 2d3ebd8..9bf0584 100644 --- a/tests/Directory.Build.props +++ b/tests/Directory.Build.props @@ -21,6 +21,7 @@ +