mirror of
https://github.com/nsnail/Ocelot.git
synced 2025-06-20 00:48:16 +08:00
update .net core 3.0 RTM (#1025)
* feat: update to asp.net core 3.0 preview 9 * fix : AspDotNetLogger unittest * feat: update generic host and useMvc 1、Using 'UseMvc' to configure MVC is not supported while using Endpoint Routing https://github.com/aspnet/AspNetCore/issues/9542 2、 use IHost and IHostBuilder * feat : update .net core 3.0 rc1 * eureka extension * fixed logger formatter error * fixed synchronous operations are disallowed of ReadToEnd method * fix log tests * Flush method of FakeStream should do nothing * Update ContentTests.cs * Fixed ws tests * feat: delelte comment code * feat: update .net core 3.0 RTM * Update OcelotBuilderTests.cs * Update .travis.yml mono 6.0.0 and dotnet 3.0.100 * Update Ocelot.IntegrationTests.csproj update Microsoft.Data.SQLite 3.0.0 * Update .travis.yml * feat: remove FrameworkReference 1、 remove FrameworkReference 2、 update package * add appveyor configuration to use version of VS2019 with dotnet core 3 sdk support * update obsoleted SetCollectionValidator method * Swap out OpenCover for Coverlet * Bump Cake to 0.35.0 * Downgrade coveralls.net to 0.7.0 Fix disposing of PollConsul instance * Remove environment specific path separator * Do not return ReportGenerator on Mac/Linux * Remove direct dependency on IInternalConfiguration * Fix ordering of variable assignment * Fix broken tests * Fix acceptance tests for Consul
This commit is contained in:
45
build.cake
45
build.cake
@ -2,10 +2,9 @@
|
||||
#tool "nuget:?package=GitReleaseNotes"
|
||||
#addin nuget:?package=Cake.Json
|
||||
#addin nuget:?package=Newtonsoft.Json
|
||||
#tool "nuget:?package=OpenCover"
|
||||
#tool "nuget:?package=ReportGenerator"
|
||||
#tool "nuget:?package=coveralls.net&version=0.7.0"
|
||||
#addin Cake.Coveralls&version=0.7.0
|
||||
#addin Cake.Coveralls&version=0.10.1
|
||||
|
||||
// compile
|
||||
var compileConfig = Argument("configuration", "Release");
|
||||
@ -119,27 +118,20 @@ Task("RunUnitTests")
|
||||
.IsDependentOn("Compile")
|
||||
.Does(() =>
|
||||
{
|
||||
var testSettings = new DotNetCoreTestSettings
|
||||
{
|
||||
Configuration = compileConfig,
|
||||
ResultsDirectory = artifactsForUnitTestsDir,
|
||||
ArgumentCustomization = args => args
|
||||
.Append("--settings test/Ocelot.UnitTests/UnitTests.runsettings")
|
||||
};
|
||||
|
||||
EnsureDirectoryExists(artifactsForUnitTestsDir);
|
||||
DotNetCoreTest(unitTestAssemblies, testSettings);
|
||||
|
||||
if (IsRunningOnWindows())
|
||||
{
|
||||
var coverageSummaryFile = artifactsForUnitTestsDir + File("coverage.xml");
|
||||
|
||||
EnsureDirectoryExists(artifactsForUnitTestsDir);
|
||||
|
||||
OpenCover(tool =>
|
||||
{
|
||||
tool.DotNetCoreTest(unitTestAssemblies);
|
||||
},
|
||||
new FilePath(coverageSummaryFile),
|
||||
new OpenCoverSettings()
|
||||
{
|
||||
Register="user",
|
||||
ArgumentCustomization=args=>args.Append(@"-oldstyle -returntargetcode -excludebyattribute:*.ExcludeFromCoverage*")
|
||||
}
|
||||
.WithFilter("+[Ocelot*]*")
|
||||
.WithFilter("-[xunit*]*")
|
||||
.WithFilter("-[Ocelot*Tests]*")
|
||||
);
|
||||
|
||||
var coverageSummaryFile = GetSubDirectories(artifactsForUnitTestsDir).First().CombineWithFilePath(File("coverage.opencover.xml"));
|
||||
ReportGenerator(coverageSummaryFile, artifactsForUnitTestsDir);
|
||||
|
||||
if (AppVeyor.IsRunningOnAppVeyor)
|
||||
@ -171,17 +163,6 @@ Task("RunUnitTests")
|
||||
var whereToCheck = !AppVeyor.IsRunningOnAppVeyor ? coverallsRepo : artifactsForUnitTestsDir;
|
||||
throw new Exception(string.Format("Code coverage fell below the threshold of {0}%. You can find the code coverage report at {1}", minCodeCoverage, whereToCheck));
|
||||
};
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
var settings = new DotNetCoreTestSettings
|
||||
{
|
||||
Configuration = compileConfig,
|
||||
};
|
||||
|
||||
EnsureDirectoryExists(artifactsForUnitTestsDir);
|
||||
DotNetCoreTest(unitTestAssemblies, settings);
|
||||
}
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user