Skip to content

Commit

Permalink
Fix and run tests on linux with net6 only
Browse files Browse the repository at this point in the history
  • Loading branch information
Toxantron committed Jul 20, 2023
1 parent d03fb30 commit 61e7322
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 27 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/dotnet-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
29 changes: 15 additions & 14 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,27 +18,28 @@ jobs:

steps:
- uses: actions/checkout@v2

# Install all supported .NET versions

- 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

- name: Restore dependencies
run: dotnet restore

- name: Build Nuget Versions
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

- name: Test on .NET 6.0
run: dotnet test -c Release -f net6.0 --no-build --no-restore -l "console;verbosity=detailed"
6 changes: 1 addition & 5 deletions src/Castle.Windsor.Tests/Castle.Windsor.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net462;netcoreapp3.1;net6.0</TargetFrameworks>
<TargetFrameworks>net462;netcoreapp3.1;net6.0</TargetFrameworks>
</PropertyGroup>

<Import Project="..\..\buildscripts\common.props"></Import>
Expand Down Expand Up @@ -69,8 +69,4 @@
<Reference Include="WindowsBase" />
</ItemGroup>

<PropertyGroup Condition="'$(TargetFramework)'=='net462'">
<DefineConstants>$(DefineConstants);FEATURE_THREADABORT;FEATURE_WPF;FEATURE_CONSOLETRACELISTENER</DefineConstants>
</PropertyGroup>

</Project>
5 changes: 3 additions & 2 deletions src/Castle.Windsor.Tests/Config/ConfigurationTestCase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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<IConfig>().ImplementedBy<Config>().Named("componentWithArrayDependency"));
Container.Register(
Classes.FromAssembly(GetCurrentAssembly()).Pick().WithServiceFirstInterface());
Expand Down

0 comments on commit 61e7322

Please sign in to comment.