diff --git a/.github/workflows/dotnet-release.yml b/.github/workflows/dotnet-release.yml
index 9351797e47..e7c5479715 100644
--- a/.github/workflows/dotnet-release.yml
+++ b/.github/workflows/dotnet-release.yml
@@ -18,12 +18,9 @@ jobs:
run: dotnet restore
- name: Build Release
run: dotnet build Castle.Windsor.sln -c Release
- - name: Castle.Windsor.Tests
- run: dotnet test src/Castle.Windsor.Tests
- - name: Castle.Windsor.Extensions.DependencyInjection.Tests
- run: dotnet test src/Castle.Windsor.Extensions.DependencyInjection.Tests
- - name: Castle.Facilities.AspNetCore.Tests
- run: dotnet test src/Castle.Facilities.AspNetCore.Tests
+ - name: Test on .NET 6.0
+ run: dotnet test -c Release -f net6.0 --no-build --no-restore -l "console;verbosity=detailed"
+
deploy:
needs: build-ubuntu
runs-on: ubuntu-latest
diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml
index d373e4b5b9..062a4ef3d2 100644
--- a/.github/workflows/dotnet.yml
+++ b/.github/workflows/dotnet.yml
@@ -1,10 +1,6 @@
name: .NET CI
on:
- push:
- paths-ignore:
- - '**.md'
- - '.github/**'
pull_request:
branches: [ master, main ]
paths-ignore:
@@ -13,32 +9,77 @@ on:
jobs:
build:
-
+ name: Build and test Linux
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
+
+ # Install all supported .NET versions
+ - name: Install .NET Core 3.1
+ uses: actions/setup-dotnet@v1
+ with:
+ dotnet-version: 3.1.x
+
- name: Setup .NET 6.0
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
+
+ # Building requires an up-to-date .NET SDK.
+ - name: Install .NET 7.0
+ uses: actions/setup-dotnet@v1
+ with:
+ dotnet-version: 7.0.x
+
+ # Restore and build
- name: Restore dependencies
- run: dotnet restore
+ run: dotnet restore
- name: Build Nuget Versions
- run: dotnet build ./tools/Explicit.NuGet.Versions/Explicit.NuGet.Versions.sln
+ run: dotnet build ./tools/Explicit.NuGet.Versions/Explicit.NuGet.Versions.sln
- name: Build Release
run: dotnet build Castle.Windsor.sln -c Release
- - name: Castle.Windsor.Tests
- run: dotnet test src/Castle.Windsor.Tests
- - name: Castle.Windsor.Extensions.DependencyInjection.Tests
- run: dotnet test src/Castle.Windsor.Extensions.DependencyInjection.Tests
- - name: Castle.Facilities.AspNetCore.Tests
- run: dotnet test src/Castle.Facilities.AspNetCore.Tests
- - name: Castle.Facilities.AspNet.SystemWeb.Tests
- run: dotnet test src/Castle.Facilities.AspNet.SystemWeb.Tests
- - name: Castle.Facilities.AspNet.Mvc.Tests
- run: dotnet test src/Castle.Facilities.AspNet.Mvc.Tests
- - name: Castle.Facilities.AspNet.WebApi.Tests
- run: dotnet test src/Castle.Facilities.AspNet.WebApi.Tests
- - name: Castle.Facilities.WcfIntegration.Tests
- run: dotnet test src/Castle.Facilities.WcfIntegration.Tests
+
+ # Run tests for linux
+
+ - name: Test on .NET Core 3.1
+ run: dotnet test -c Release -f netcoreapp3.1 --no-build --no-restore -l "console;verbosity=detailed"
+
+ - name: Test on .NET 6.0
+ run: dotnet test -c Release -f net6.0 --no-build --no-restore -l "console;verbosity=detailed"
+
+ test-windows:
+ name: Build and test on Windows
+ runs-on: windows-latest
+
+ steps:
+ - uses: actions/checkout@v2
+
+ # Several .NET Core versions will be used during the test run.
+ # The lowest version gets installed first in order to prevent
+ # "a newer version is already installed" install errors.
+
+ - name: Install .NET Core 2.1
+ uses: actions/setup-dotnet@v1
+ with:
+ dotnet-version: 2.1.x
+
+ - name: Install .NET Core 3.1
+ uses: actions/setup-dotnet@v1
+ with:
+ dotnet-version: 3.1.x
+
+ - name: Install .NET 6.0
+ uses: actions/setup-dotnet@v1
+ with:
+ dotnet-version: 6.0.x
+
+ # Building requires an up-to-date .NET SDK.
+ - name: Install .NET 7.0
+ uses: actions/setup-dotnet@v1
+ with:
+ dotnet-version: 7.0.x
+
+ # Run tests on windows
+ - name: Test on .NET Framework 4.6.2 (Windows only)
+ run: dotnet test -c Release -f net462 -l "console;verbosity=detailed"
diff --git a/src/Castle.Windsor.Tests/Castle.Windsor.Tests.csproj b/src/Castle.Windsor.Tests/Castle.Windsor.Tests.csproj
index 4a9a1b29fa..ea60c75dd3 100644
--- a/src/Castle.Windsor.Tests/Castle.Windsor.Tests.csproj
+++ b/src/Castle.Windsor.Tests/Castle.Windsor.Tests.csproj
@@ -1,7 +1,7 @@
- net462;netcoreapp3.1;net6.0
+ net462;netcoreapp3.1;net6.0
@@ -45,7 +45,7 @@
-
+
@@ -69,8 +69,4 @@
-
- $(DefineConstants);FEATURE_THREADABORT;FEATURE_WPF;FEATURE_CONSOLETRACELISTENER
-
-
diff --git a/src/Castle.Windsor.Tests/Config/ConfigurationTestCase.cs b/src/Castle.Windsor.Tests/Config/ConfigurationTestCase.cs
index e8a6858775..83b613b5c7 100644
--- a/src/Castle.Windsor.Tests/Config/ConfigurationTestCase.cs
+++ b/src/Castle.Windsor.Tests/Config/ConfigurationTestCase.cs
@@ -15,7 +15,7 @@
namespace Castle.MicroKernel.Tests.Configuration
{
using System.Collections.Generic;
-
+ using System.IO;
using Castle.Core;
using Castle.Core.Configuration;
using Castle.Core.Resource;
@@ -218,7 +218,8 @@ public void ShouldNotThrowCircularDependencyException()
[Test]
public void Can_properly_populate_array_dependency_from_xml_config_when_registering_by_convention()
{
- Container.Install(Configuration.FromXmlFile("config\\ComponentWithArrayDependency.config"))
+ var path = Path.Combine("Config", "ComponentWithArrayDependency.config");
+ Container.Install(Configuration.FromXmlFile(path))
.Register(Component.For().ImplementedBy().Named("componentWithArrayDependency"));
Container.Register(
Classes.FromAssembly(GetCurrentAssembly()).Pick().WithServiceFirstInterface());