Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CI Workflow and update dependencies #209

Merged
merged 1 commit into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/workflows/testcentric-engine-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: TestCentric.Engine.CI

on:
workflow_dispatch:
pull_request:
push:

jobs:
ContinuousIntegration:
uses: TestCentric/TestCentric.Workflows/.github/workflows/testcentric-ci.yml@main
secrets: inherit
47 changes: 24 additions & 23 deletions build.cake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Load the recipe
#load nuget:?package=TestCentric.Cake.Recipe&version=1.3.2
#load nuget:?package=TestCentric.Cake.Recipe&version=1.3.3
// Comment out above line and uncomment below for local tests of recipe changes
//#load ../TestCentric.Cake.Recipe/recipe/*.cake

Expand Down Expand Up @@ -39,12 +39,12 @@ packageTests.Add(new PackageTest(1, "Net35Test", "Run mock-assembly.dll targetin
"engine-tests/net35/mock-assembly.dll",
MockAssemblyExpectedResult("Net462AgentLauncher")));

packageTests.Add(new PackageTest(1, "NetCore31Test", "Run mock-assembly.dll targeting .NET Core 3.1",
"engine-tests/netcoreapp3.1/mock-assembly.dll",
MockAssemblyExpectedResult("Net60AgentLauncher")));

if (!BuildSettings.IsRunningOnAppVeyor)
if (BuildSettings.IsLocalBuild)
{
packageTests.Add(new PackageTest(1, "NetCore31Test", "Run mock-assembly.dll targeting .NET Core 3.1",
"engine-tests/netcoreapp3.1/mock-assembly.dll",
MockAssemblyExpectedResult("Net60AgentLauncher")));

packageTests.Add(new PackageTest(1, "NetCore21Test", "Run mock-assembly.dll targeting .NET Core 2.1",
"engine-tests/netcoreapp2.1/mock-assembly.dll",
MockAssemblyExpectedResult("Net60AgentLauncher")));
Expand All @@ -62,10 +62,9 @@ packageTests.Add(new PackageTest(1, "Net70Test", "Run mock-assembly.dll targetin
"engine-tests/net7.0/mock-assembly.dll",
MockAssemblyExpectedResult("Net70AgentLauncher")));

if (!BuildSettings.IsRunningOnAppVeyor)
packageTests.Add(new PackageTest(1, "Net80Test", "Run mock-assembly.dll targeting .NET 8.0",
"engine-tests/net8.0/mock-assembly.dll",
MockAssemblyExpectedResult("Net80AgentLauncher")));
packageTests.Add(new PackageTest(1, "Net80Test", "Run mock-assembly.dll targeting .NET 8.0",
"engine-tests/net8.0/mock-assembly.dll",
MockAssemblyExpectedResult("Net80AgentLauncher")));

static ExpectedResult MockAssemblyExpectedResult(params string[] agentNames)
{
Expand All @@ -89,20 +88,22 @@ static ExpectedResult MockAssemblyExpectedResult(params string[] agentNames)

// AspNetCore Tests

packageTests.Add(new PackageTest(1, "AspNetCore31Test", "Run test using AspNetCore under .NET Core 3.1",
"engine-tests/netcoreapp3.1/aspnetcore-test.dll",
new ExpectedResult("Passed")
{
Assemblies = new [] { new ExpectedAssemblyResult("aspnetcore-test.dll", "Net60AgentLauncher") }
}));
if (BuildSettings.IsLocalBuild)
{
packageTests.Add(new PackageTest(1, "AspNetCore31Test", "Run test using AspNetCore under .NET Core 3.1",
"engine-tests/netcoreapp3.1/aspnetcore-test.dll",
new ExpectedResult("Passed")
{
Assemblies = new[] { new ExpectedAssemblyResult("aspnetcore-test.dll", "Net60AgentLauncher") }
}));

if (!BuildSettings.IsRunningOnAppVeyor)
packageTests.Add(new PackageTest(1, "AspNetCore50Test", "Run test using AspNetCore under .NET 5.0",
"engine-tests/net5.0/aspnetcore-test.dll",
new ExpectedResult("Passed")
{
Assemblies = new [] { new ExpectedAssemblyResult("aspnetcore-test.dll", "Net60AgentLauncher") }
Assemblies = new[] { new ExpectedAssemblyResult("aspnetcore-test.dll", "Net60AgentLauncher") }
}));
}

packageTests.Add(new PackageTest(1, "AspNetCore60Test", "Run test using AspNetCore under .NET 6.0",
"engine-tests/net6.0/aspnetcore-test.dll",
Expand All @@ -120,7 +121,7 @@ packageTests.Add(new PackageTest(1, "AspNetCore70Test", "Run test using AspNetCo

// Windows Forms Tests

if (!BuildSettings.IsRunningOnAppVeyor)
if (BuildSettings.IsLocalBuild)
packageTests.Add(new PackageTest(1, "Net50WindowsFormsTest", "Run test using windows forms under .NET 5.0",
"engine-tests/net5.0-windows/windows-forms-test.dll",
new ExpectedResult("Passed")
Expand Down Expand Up @@ -210,10 +211,10 @@ BuildSettings.Packages.Add(new NuGetPackage(
},
tests: packageTests,
preloadedExtensions: new [] {
KnownExtensions.Net462PluggableAgent.NuGetPackage.LatestDevBuild,
KnownExtensions.Net60PluggableAgent.NuGetPackage.LatestDevBuild,
KnownExtensions.Net70PluggableAgent.NuGetPackage.LatestDevBuild,
KnownExtensions.Net80PluggableAgent.NuGetPackage.LatestDevBuild }
KnownExtensions.Net462PluggableAgent.SetVersion("2.5.1").NuGetPackage,
KnownExtensions.Net60PluggableAgent.SetVersion("2.5.1").NuGetPackage,
KnownExtensions.Net70PluggableAgent.SetVersion("2.5.1").NuGetPackage,
KnownExtensions.Net80PluggableAgent.SetVersion("2.5.1").NuGetPackage }
));

//////////////////////////////////////////////////////////////////////
Expand Down
13 changes: 4 additions & 9 deletions src/TestEngine/testcentric.engine/Services/ExtensionService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// ***********************************************************************

using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using TestCentric.Engine.Internal;
Expand Down Expand Up @@ -95,15 +96,9 @@ public override void StartService()
{
try
{

_extensionManager = new ExtensionManager(ENGINE_ASSEMBLY, ENGINE_API_ASSEMBLY)
{
DefaultTypeExtensionPrefix = "/TestCentric/Engine/TypeExtensions/",
InitialAddinsDirectory = ENGINE_DIRECTORY
};

_extensionManager.Initialize();

_extensionManager = new ExtensionManager("/TestCentric/Engine/TypeExtensions/");
_extensionManager.FindExtensionPoints(ENGINE_ASSEMBLY, ENGINE_API_ASSEMBLY);
_extensionManager.FindExtensions(ENGINE_DIRECTORY);
Status = ServiceStatus.Started;
}
catch
Expand Down
8 changes: 4 additions & 4 deletions src/TestEngine/testcentric.engine/testcentric.engine.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="TestCentric.Engine.Api" Version="2.0.0-dev00017" />
<PackageReference Include="TestCentric.Engine.Api" Version="2.0.0-beta6" />
<PackageReference Include ="NUnit.Engine.Api" Version="3.18.3.0" />
<PackageReference Include="TestCentric.Extensibility" Version="3.0.0" />
<PackageReference Include="TestCentric.Metadata" Version="3.0.2" />
<PackageReference Include="TestCentric.InternalTrace" Version="1.2.0" />
<PackageReference Include="TestCentric.Extensibility" Version="3.0.2" />
<PackageReference Include="TestCentric.Metadata" Version="3.0.3" />
<PackageReference Include="TestCentric.InternalTrace" Version="1.2.1" />
</ItemGroup>

</Project>
12 changes: 12 additions & 0 deletions testcentric-engine.sln
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "windows-forms-test", "src\T
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "testcentric.engine.tests", "src\TestEngine\testcentric.engine.tests\testcentric.engine.tests.csproj", "{5C9826A6-4A5C-4CE4-9BCE-4C4DB091EECB}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".github", ".github", "{5EF03E03-77C4-4CF0-8FBA-E07025257A1A}"
ProjectSection(SolutionItems) = preProject
.github\dependabot.yml = .github\dependabot.yml
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{4A075BD7-F73E-42FF-87E6-41A6226B9628}"
ProjectSection(SolutionItems) = preProject
.github\workflows\testcentric-engine-ci.yml = .github\workflows\testcentric-engine-ci.yml
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -106,6 +116,8 @@ Global
{6100F27F-D346-4F18-841E-EEA2BD2CC08E} = {EA14AF63-0F5D-4938-9C87-6EC67A961DB3}
{81412379-ABD5-4079-A32A-1C887FA74674} = {EA14AF63-0F5D-4938-9C87-6EC67A961DB3}
{5C9826A6-4A5C-4CE4-9BCE-4C4DB091EECB} = {EA14AF63-0F5D-4938-9C87-6EC67A961DB3}
{5EF03E03-77C4-4CF0-8FBA-E07025257A1A} = {A65042E1-D8BC-48DD-8DE1-F0991F07EA77}
{4A075BD7-F73E-42FF-87E6-41A6226B9628} = {5EF03E03-77C4-4CF0-8FBA-E07025257A1A}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {CDFF439B-8888-4133-8734-86F4F899BC40}
Expand Down