Open laurentkempe opened 2 years ago
Graph time spent running tests or any target ran by nuke build Add a custom build metric to be able to fail the build
See https://twitter.com/laurentkempe/status/1562741381021716482
See https://www.jetbrains.com/help/teamcity/2021.2/build-failure-conditions.html#Adding+Custom+Build+Metric
You can also use code to report a metric
protected override void OnTargetSucceeded(string target) { base.OnTargetSucceeded(target); if (!target.Equals(nameof(Tests))) return; var testsTarget = SucceededTargets.SingleOrDefault(executableTarget => executableTarget.Name.Equals(nameof(Tests))); if (testsTarget == null) return; Serilog.Log.Information("Tests succeeded in {BCTestsTargetRunDuration}", testsTarget.Duration); TeamCity.Instance?.AddStatisticValue("BCTestsTargetRunDuration", testsTarget.Duration.ToString()); }
Graph time spent running tests or any target ran by nuke build Add a custom build metric to be able to fail the build
See https://twitter.com/laurentkempe/status/1562741381021716482
See https://www.jetbrains.com/help/teamcity/2021.2/build-failure-conditions.html#Adding+Custom+Build+Metric
You can also use code to report a metric