代码拉取完成,页面将自动刷新
#tool nuget:?package=vswhere
#tool "nuget:?package=xunit.runner.console&version=2.3.0-beta5-build3769"
//////////////////////////////////////////////////////////////////////
// ARGUMENTS
//////////////////////////////////////////////////////////////////////
var projectName = "Abp";
var solution = "./" + projectName + ".sln";
var target = Argument("target", "Default");
var configuration = Argument("configuration", "Release");
var toolpath = Argument("toolpath", @"tools");
var branch = Argument("branch", EnvironmentVariable("APPVEYOR_REPO_BRANCH"));
var vsLatest = VSWhereLatest();
var msBuildPathX64 = (vsLatest==null)
? null
: vsLatest.CombineWithFilePath("./MSBuild/15.0/Bin/amd64/MSBuild.exe");
var testProjects = new List<Tuple<string, string[]>>
{
new Tuple<string, string[]>("Abp.AspNetCore.Tests", new[] { "net461", "netcoreapp2.2" }),
new Tuple<string, string[]>("Abp.AutoMapper.Tests", new[] { "net461", "netcoreapp2.2" }),
new Tuple<string, string[]>("Abp.Castle.Log4Net.Tests", new[] { "net461", "netcoreapp2.2" }),
new Tuple<string, string[]>("Abp.Dapper.NHibernate.Tests", new[] { "net461"}),
new Tuple<string, string[]>("Abp.Dapper.Tests", new[] { "net461" }),
new Tuple<string, string[]>("Abp.EntityFramework.GraphDiff.Tests", new[] { "net461" }),
new Tuple<string, string[]>("Abp.EntityFramework.Tests", new[] { "net461" }),
new Tuple<string, string[]>("Abp.EntityFrameworkCore.Dapper.Tests", new[] { "netcoreapp2.2" }),
new Tuple<string, string[]>("Abp.EntityFrameworkCore.Tests", new[] { "net461", "netcoreapp2.2" }),
new Tuple<string, string[]>("Abp.MailKit.Tests", new[] { "net461", "netcoreapp2.2" }),
new Tuple<string, string[]>("Abp.MemoryDb.Tests", new[] { "net461", "netcoreapp2.2" }),
new Tuple<string, string[]>("Abp.NHibernate.Tests", new[] { "net461" }),
new Tuple<string, string[]>("Abp.Quartz.Tests", new[] { "net461" }),
new Tuple<string, string[]>("Abp.RedisCache.Tests", new[] { "net461", "netcoreapp2.2" }),
new Tuple<string, string[]>("Abp.TestBase.SampleApplication.Tests", new[] { "net461" }),
new Tuple<string, string[]>("Abp.Tests", new[] { "net461", "netcoreapp2.2" }),
new Tuple<string, string[]>("Abp.Web.Api.Tests", new[] { "net461" }),
new Tuple<string, string[]>("Abp.Web.Common.Tests", new[] { "net461", "netcoreapp2.2" }),
new Tuple<string, string[]>("Abp.Web.Mvc.Tests", new[] { "net461" }),
new Tuple<string, string[]>("Abp.Web.Tests", new[] { "net461" }),
new Tuple<string, string[]>("Abp.Zero.SampleApp.NHibernateTests", new[] { "net461" }),
new Tuple<string, string[]>("Abp.Zero.SampleApp.Tests", new[] { "net461" }),
new Tuple<string, string[]>("Abp.ZeroCore.Tests", new[] { "netcoreapp2.2" }),
new Tuple<string, string[]>("Abp.ZeroCore.IdentityServer4.Tests", new[] { "netcoreapp2.2" })
};
var nugetPath = toolpath + "/nuget.exe";
//////////////////////////////////////////////////////////////////////
// TASKS
//////////////////////////////////////////////////////////////////////
Task("Clean")
.Does(() =>
{
Information("Current Branch is:" + branch);
CleanDirectories("./src/**/bin");
CleanDirectories("./src/**/obj");
CleanDirectories("./test/**/bin");
CleanDirectories("./test/**/obj");
});
Task("Restore-NuGet-Packages")
.IsDependentOn("Clean")
.Does(() =>
{
NuGetRestore(solution);
DotNetCoreRestore(solution);
});
Task("Build")
.IsDependentOn("Restore-NuGet-Packages")
.Does(() =>
{
MSBuild(solution, new MSBuildSettings(){Configuration = configuration, ToolPath = msBuildPathX64}
.WithProperty("SourceLinkCreate","true"));
});
Task("Run-Unit-Tests")
.IsDependentOn("Build")
.DoesForEach(testProjects, testProject =>
{
foreach (string targetFramework in testProject.Item2)
{
Information($"Test execution started for target frameowork: {targetFramework}...");
var testProj = GetFiles($"./test/**/*{testProject.Item1}.csproj").First();
DotNetCoreTest(testProj.FullPath, new DotNetCoreTestSettings { Configuration = "Release", Framework = targetFramework });
}
})
.DeferOnError();
//////////////////////////////////////////////////////////////////////
// TASK TARGETS
//////////////////////////////////////////////////////////////////////
Task("Default")
.IsDependentOn("Build")
.IsDependentOn("Run-Unit-Tests");
//////////////////////////////////////////////////////////////////////
// EXECUTION
//////////////////////////////////////////////////////////////////////
RunTarget(target);
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。