mirror of
https://github.com/zoriya/octokit.net.git
synced 2025-12-06 07:16:09 +00:00
* Cross target Octokit.Tests against netcoreapp1.0 and net452 * Add net45-specific references This fixes a build error after adding the net452 target: error CS0656: Missing compiler required member 'Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo.Create' * Add SimpleJson conditional compilation symbols for net45 * Disable AppDomain when running tests Thanks to Dominick and Patrik: https://twitter.com/leastprivilege/status/893376624233762816 * Use nameof operator instead of magic strings * Remove conditional compilation symbols as they are not used in the conventions tests project * Enable cross targetting in the conventions tests project * Run tests against netcoreapp1.0 only when not on Windows * Going too fast bites you
53 lines
1.4 KiB
C#
53 lines
1.4 KiB
C#
using Cake.Common;
|
|
using Cake.Common.Diagnostics;
|
|
using Cake.Common.Tools.DotNetCore.Test;
|
|
using Cake.Core;
|
|
using Cake.Core.IO;
|
|
using Cake.Frosting;
|
|
|
|
public class Context : FrostingContext
|
|
{
|
|
public string Target { get; set; }
|
|
public string Configuration { get; set; }
|
|
public bool LinkSources { get; set; }
|
|
public BuildVersion Version { get; set; }
|
|
|
|
public DirectoryPath Artifacts { get; set; }
|
|
|
|
public bool IsLocalBuild { get; set; }
|
|
public bool IsPullRequest { get; set; }
|
|
public bool IsOriginalRepo { get; set; }
|
|
public bool IsTagged { get; set; }
|
|
public bool IsMasterBranch { get; set; }
|
|
public bool ForcePublish { get; set; }
|
|
|
|
public bool AppVeyor { get; set; }
|
|
public bool TravisCI { get; set; }
|
|
|
|
public Project[] Projects { get; set; }
|
|
|
|
public DotNetCoreTestSettings GetTestSettings()
|
|
{
|
|
var settings = new DotNetCoreTestSettings
|
|
{
|
|
Configuration = Configuration,
|
|
NoBuild = true,
|
|
Verbose = false
|
|
};
|
|
|
|
if (!this.IsRunningOnWindows())
|
|
{
|
|
var testFramework = "netcoreapp1.0";
|
|
|
|
this.Information($"Running tests against {testFramework} only as we're not on Windows.");
|
|
settings.Framework = testFramework;
|
|
}
|
|
|
|
return settings;
|
|
}
|
|
|
|
public Context(ICakeContext context)
|
|
: base(context)
|
|
{
|
|
}
|
|
} |