Skip to content

Commit

Permalink
[Feature] - Updated to net5.0 (sound-it-out#172)
Browse files Browse the repository at this point in the history
* Updated to net5.0

* Fixed build.

* Updated github actions.

* fixed build.

* Updated lgtm config.
  • Loading branch information
AtLeastITry authored Nov 14, 2020
1 parent 9bb9729 commit dd3822a
Show file tree
Hide file tree
Showing 14 changed files with 73 additions and 70 deletions.
21 changes: 6 additions & 15 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ jobs:
steps:
- uses: actions/checkout@v2

# Install .NET Core
- name: Setup .NET Core
# Install .NET
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.101
dotnet-version: 5.0.100

# Restore projects
- name: Restore projects
Expand All @@ -25,15 +25,6 @@ jobs:
- name: Build projects
run: dotnet build --configuration Release --no-restore

# Test SIO.Domain.Tests
- name: Test SIO.Domain.Tests
run: dotnet test tests/SIO.Domain.Tests/SIO.Domain.Tests.csproj --configuration Release --no-restore --no-build --verbosity normal -- xunit.parallelizeAssembly=true
# Test SIO.Identity.Tests
- name: Test SIO.Identity.Tests
run: dotnet test tests/SIO.Identity.Tests/SIO.Identity.Tests.csproj --configuration Release --no-restore --no-build --verbosity normal -- xunit.parallelizeAssembly=true
# Test SIO.Infrastructure.Tests
- name: Test SIO.Infrastructure.Tests
run: dotnet test tests/SIO.Infrastructure.Tests/SIO.Infrastructure.Tests.csproj --configuration Release --no-restore --no-build --verbosity normal -- xunit.parallelizeAssembly=true
# Test SIO.Migrations.Tests
- name: Test SIO.Migrations.Tests
run: dotnet test tests/SIO.Migrations.Tests/SIO.Migrations.Tests.csproj --configuration Release --no-restore --no-build --verbosity normal -- xunit.parallelizeAssembly=true
# Test projects
- name: Test projects
run: dotnet test SIO-Identity.sln --configuration Release --no-restore --no-build --verbosity normal -- xunit.parallelizeAssembly=true
21 changes: 6 additions & 15 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# Install .NET Core
- name: Setup .NET Core
# Install .NET
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.101
dotnet-version: 5.0.100

# Restore projects
- name: Restore projects
Expand All @@ -22,15 +22,6 @@ jobs:
- name: Build projects
run: dotnet build --configuration Release --no-restore

# Test SIO.Domain.Tests
- name: Test SIO.Domain.Tests
run: dotnet test tests/SIO.Domain.Tests/SIO.Domain.Tests.csproj --configuration Release --no-restore --no-build --verbosity normal -- xunit.parallelizeAssembly=true
# Test SIO.Identity.Tests
- name: Test SIO.Identity.Tests
run: dotnet test tests/SIO.Identity.Tests/SIO.Identity.Tests.csproj --configuration Release --no-restore --no-build --verbosity normal -- xunit.parallelizeAssembly=true
# Test SIO.Infrastructure.Tests
- name: Test SIO.Infrastructure.Tests
run: dotnet test tests/SIO.Infrastructure.Tests/SIO.Infrastructure.Tests.csproj --configuration Release --no-restore --no-build --verbosity normal -- xunit.parallelizeAssembly=true
# Test SIO.Migrations.Tests
- name: Test SIO.Migrations.Tests
run: dotnet test tests/SIO.Migrations.Tests/SIO.Migrations.Tests.csproj --configuration Release --no-restore --no-build --verbosity normal -- xunit.parallelizeAssembly=true
# Test projects
- name: Test projects
run: dotnet test SIO-Identity.sln --configuration Release --no-restore --no-build --verbosity normal -- xunit.parallelizeAssembly=true
2 changes: 1 addition & 1 deletion lgtm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ extraction:
csharp:
index:
dotnet:
version: 3.1.301
version: 5.0.100
2 changes: 1 addition & 1 deletion src/SIO.Domain/SIO.Domain.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions src/SIO.Identity/Login/LoginController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,9 @@ private async Task<LoginResponse> BuildResponseAsync(string returnUrl)
var providers = schemes.Where(scheme => !string.IsNullOrWhiteSpace(scheme.DisplayName))
.Select(scheme => new ExternalProvider(scheme.DisplayName, scheme.Name));

if (context?.ClientId != null)
if (context?.Client?.ClientId != null)
{
var client = await _clientStore.FindEnabledClientByIdAsync(context.ClientId);
var client = await _clientStore.FindEnabledClientByIdAsync(context.Client.ClientId);

if (client != null)
{
Expand Down
10 changes: 5 additions & 5 deletions src/SIO.Identity/SIO.Identity.csproj
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net5.0</TargetFramework>
<AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel>
<UserSecretsId>869b8ac0-3c1c-45a1-b4a6-3fd4c386514e</UserSecretsId>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="IdentityServer4" Version="3.0.0" />
<PackageReference Include="IdentityServer4" Version="4.1.1" />
<PackageReference Include="IdentityServer4.AccessTokenValidation" Version="3.0.1" />
<PackageReference Include="IdentityServer4.AspNetIdentity" Version="3.0.0" />
<PackageReference Include="IdentityServer4.EntityFramework" Version="3.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="3.1.1" />
<PackageReference Include="IdentityServer4.AspNetIdentity" Version="4.1.1" />
<PackageReference Include="IdentityServer4.EntityFramework" Version="4.1.1" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="5.0.0" />
<PackageReference Include="OpenEventSourcing" Version="0.4.0" />
<PackageReference Include="OpenEventSourcing.Azure.ServiceBus" Version="0.4.0" />
<PackageReference Include="OpenEventSourcing.EntityFrameworkCore.SqlServer" Version="0.4.0" />
Expand Down
1 change: 0 additions & 1 deletion src/SIO.Identity/ServiceCollectionExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ public static IServiceCollection AddSIOIdentity(this IServiceCollection services
options.UserInteraction.ErrorUrl = "/error";
options.UserInteraction.ConsentUrl = "/consent";
options.Cors.CorsPaths.Add("/v1/client");
options.PublicOrigin = configuration.GetValue<string>("Identity:Authority");
})
.AddConfigurationStore(options =>
{
Expand Down
4 changes: 2 additions & 2 deletions src/SIO.Infrastructure/SIO.Infrastructure.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
8 changes: 4 additions & 4 deletions src/SIO.Migrations/SIO.Migrations.csproj
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="IdentityServer4.EntityFramework" Version="3.0.0" />
<PackageReference Include="IdentityServer4.EntityFramework" Version="4.1.1" />
<PackageReference Include="Microsoft.AspNetCore.Hosting.Abstractions" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="3.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="3.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="5.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="5.0.0" />
<PackageReference Include="System.Data.SqlClient" Version="4.8.2" />
<PackageReference Include="OpenEventSourcing" Version="0.4.0" />
<PackageReference Include="OpenEventSourcing.EntityFrameworkCore.SqlServer" Version="0.4.0" />
Expand Down
11 changes: 7 additions & 4 deletions tests/SIO.Domain.Tests/SIO.Domain.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net5.0</TargetFramework>

<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.5.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.1" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="1.2.0" />
<PackageReference Include="coverlet.collector" Version="1.3.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
Expand Down
10 changes: 10 additions & 0 deletions tests/SIO.Identity.Tests/MockIdentityServerInteraction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,21 @@ public Task<string> CreateLogoutContextAsync()
return Task.FromResult("MockLogoutId");
}

public Task DenyAuthorizationAsync(AuthorizationRequest request, AuthorizationError error, string errorDescription = null)
{
throw new NotImplementedException();
}

public Task<IEnumerable<Consent>> GetAllUserConsentsAsync()
{
throw new NotImplementedException();
}

public Task<IEnumerable<Grant>> GetAllUserGrantsAsync()
{
throw new NotImplementedException();
}

public Task<AuthorizationRequest> GetAuthorizationContextAsync(string returnUrl)
{
if (HasAuthorizationContext)
Expand Down
27 changes: 15 additions & 12 deletions tests/SIO.Identity.Tests/SIO.Identity.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net5.0</TargetFramework>

<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="FluentAssertions" Version="5.10.3" />
<PackageReference Include="Microsoft.AspNetCore.Identity" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="3.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="3.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="3.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.4.0" />
<PackageReference Include="Moq" Version="4.14.5" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="5.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="5.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.1" />
<PackageReference Include="Moq" Version="4.15.1" />
<PackageReference Include="OpenEventSourcing" Version="0.4.0" />
<PackageReference Include="OpenEventSourcing.EntityFrameworkCore.InMemory" Version="0.4.0" />
<PackageReference Include="OpenEventSourcing.Serialization.Json" Version="0.4.0" />
Expand All @@ -24,11 +24,14 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="1.0.1" />
<PackageReference Include="IdentityServer4" Version="3.0.0" />
<PackageReference Include="coverlet.collector" Version="1.3.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="IdentityServer4" Version="4.1.1" />
<PackageReference Include="IdentityServer4.AccessTokenValidation" Version="3.0.1" />
<PackageReference Include="IdentityServer4.AspNetIdentity" Version="3.0.0" />
<PackageReference Include="IdentityServer4.EntityFramework" Version="3.0.0" />
<PackageReference Include="IdentityServer4.AspNetIdentity" Version="4.1.1" />
<PackageReference Include="IdentityServer4.EntityFramework" Version="4.1.1" />
</ItemGroup>

<ItemGroup>
Expand Down
11 changes: 7 additions & 4 deletions tests/SIO.Infrastructure.Tests/SIO.Infrastructure.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net5.0</TargetFramework>

<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.5.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.1" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="1.2.0" />
<PackageReference Include="coverlet.collector" Version="1.3.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
Expand Down
11 changes: 7 additions & 4 deletions tests/SIO.Migrations.Tests/SIO.Migrations.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net5.0</TargetFramework>

<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.5.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.1" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="1.2.0" />
<PackageReference Include="coverlet.collector" Version="1.3.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit dd3822a

Please sign in to comment.