Skip to content

Commit

Permalink
Merge pull request #11 from IliyanIlievPH/10
Browse files Browse the repository at this point in the history
Closes #10
  • Loading branch information
PaterSantyago authored Jul 20, 2020
2 parents 36006ae + 33d80ac commit 965b852
Show file tree
Hide file tree
Showing 22 changed files with 67 additions and 56 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 2.2.207
dotnet-version: 3.1.302
- name: Install dependencies
run: dotnet restore
- name: Build solution
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 2.2.207
dotnet-version: 3.1.302
- name: Install dependencies
run: dotnet restore
- name: Build
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
<None Remove="MAVN.Service.Staking.Client.xml" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Lykke.HttpClientGenerator" Version="2.5.0" />
<PackageReference Include="Lykke.SettingsReader" Version="5.2.0" />
<PackageReference Include="Lykke.HttpClientGenerator" Version="3.1.0" />
<PackageReference Include="Lykke.SettingsReader" Version="5.3.0" />
<PackageReference Include="MAVN.Numerics" Version="1.0.0" />
<PackageReference Include="Refit" Version="4.6.107" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/MAVN.Job.Staking/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM microsoft/dotnet:2.2-aspnetcore-runtime
FROM microsoft/dotnet:3.1-aspnetcore-runtime
WORKDIR /app
COPY . .
ENTRYPOINT ["dotnet", "MAVN.Job.Staking.dll"]
7 changes: 4 additions & 3 deletions src/MAVN.Job.Staking/MAVN.Job.Staking.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.2</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
<Version>1.0.0</Version>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
Expand All @@ -21,8 +21,9 @@
</None>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Lykke.Sdk" Version="5.17.0" />
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.13.1" />
<PackageReference Include="Lykke.Logs" Version="7.4.0" />
<PackageReference Include="Lykke.Sdk" Version="5.18.0" />
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.14.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\MAVN.Service.Staking.MsSqlRepositories\MAVN.Service.Staking.MsSqlRepositories.csproj" />
Expand Down
6 changes: 3 additions & 3 deletions src/MAVN.Job.Staking/Modules/DataLayerModule.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
using Autofac;
using Autofac;
using JetBrains.Annotations;
using MAVN.Common.MsSql;
using Lykke.Job.Staking.Settings;
using Lykke.Job.Staking.Settings.JobSettings;
using MAVN.Service.Staking.Domain.Repositories;
using MAVN.Service.Staking.MsSqlRepositories;
using MAVN.Service.Staking.MsSqlRepositories.Repositories;
using Lykke.SettingsReader;
using MAVN.Persistence.PostgreSQL.Legacy;

namespace Lykke.Job.Staking.Modules
{
Expand All @@ -22,7 +22,7 @@ public DataLayerModule(IReloadingManager<AppSettings> appSettings)

protected override void Load(ContainerBuilder builder)
{
builder.RegisterMsSql(
builder.RegisterPostgreSQL(
_settings.DataConnString,
connString => new StakingContext(connString, false),
dbConn => new StakingContext(dbConn));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
<Version>1.0.0</Version>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Lykke.Common" Version="7.5.0" />
<PackageReference Include="MAVN.Common.MsSql" Version="3.0.0" />
<PackageReference Include="MAVN.Numerics" Version="1.0.0" />
<PackageReference Include="MAVN.Persistence.PostgreSQL.Legacy" Version="1.1.0" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Collections.Generic;
using System.Collections.Generic;
using System.Threading.Tasks;
using MAVN.Numerics;
using MAVN.Common.MsSql;
using MAVN.Persistence.PostgreSQL.Legacy;
using MAVN.Service.Staking.Domain.Enums;
using MAVN.Service.Staking.Domain.Models;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using System.Threading.Tasks;
using MAVN.Common.MsSql;
using System.Threading.Tasks;
using MAVN.Persistence.PostgreSQL.Legacy;
using MAVN.Service.Staking.Domain.Models;

namespace MAVN.Service.Staking.Domain.Repositories
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
<Version>1.0.0</Version>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="AutoMapper" Version="9.0.0" />
<PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="7.0.0" />
<PackageReference Include="Lykke.RabbitMqBroker" Version="7.13.1" />
<PackageReference Include="MAVN.Common.MsSql" Version="3.0.0" />
<PackageReference Include="Lykke.RabbitMqBroker" Version="7.13.3" />
<PackageReference Include="MAVN.Persistence.PostgreSQL.Legacy" Version="1.1.0" />
<PackageReference Include="MAVN.PrivateBlockchain.MVNToken" Version="1.0.0-beta.1" />
<PackageReference Include="MAVN.Service.Campaign.Client" Version="1.0.1" />
<PackageReference Include="MAVN.Service.CustomerProfile.Client" Version="1.3.0" />
<PackageReference Include="MAVN.Service.CustomerProfile.Contract" Version="1.3.0" />
<PackageReference Include="MAVN.Service.CustomerProfile.Client" Version="2.2.0" />
<PackageReference Include="MAVN.Service.CustomerProfile.Contract" Version="2.2.0" />
<PackageReference Include="MAVN.Service.NotificationSystem.SubscriberContract" Version="1.1.0" />
<PackageReference Include="MAVN.Service.PrivateBlockchainFacade.Client" Version="1.1.0" />
<PackageReference Include="MAVN.Service.PrivateBlockchainFacade.Contract" Version="1.1.0" />
<PackageReference Include="MAVN.Service.WalletManagement.Client" Version="1.0.1" />
<PackageReference Include="MAVN.Service.WalletManagement.Client" Version="1.1.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\contract\MAVN.Service.Staking.Contract\MAVN.Service.Staking.Contract.csproj" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
using MAVN.Numerics;
using Lykke.Common;
using Lykke.Common.Log;
using MAVN.Common.MsSql;
using Lykke.RabbitMqBroker.Publisher;
using MAVN.Persistence.PostgreSQL.Legacy;
using MAVN.Service.Campaign.Client;
using MAVN.Service.Campaign.Client.Models.Enums;
using MAVN.Service.CustomerProfile.Client;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using System;
using System.Threading.Tasks;
using MAVN.Numerics;
using MAVN.Common.MsSql;
using Lykke.RabbitMqBroker.Publisher;
using MAVN.Persistence.PostgreSQL.Legacy;
using MAVN.Service.PrivateBlockchainFacade.Client;
using MAVN.Service.PrivateBlockchainFacade.Client.Models;
using MAVN.Service.Staking.Contract.Events;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
<Version>1.0.0</Version>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Lykke.AzureStorage" Version="8.13.4" />
<PackageReference Include="MAVN.Common.MsSql" Version="3.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="2.2.6" />
<PackageReference Include="MAVN.Persistence.PostgreSQL.Legacy" Version="1.1.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="3.1.5">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\MAVN.Service.Staking.Domain\MAVN.Service.Staking.Domain.csproj" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Threading.Tasks;
using MAVN.Numerics;
using MAVN.Common.MsSql;
using MAVN.Persistence.PostgreSQL.Legacy;
using MAVN.Service.Staking.Domain.Enums;
using MAVN.Service.Staking.Domain.Models;
using MAVN.Service.Staking.Domain.Repositories;
Expand Down Expand Up @@ -32,9 +32,9 @@ public class ReferralStakesRepository : IReferralStakesRepository
IsWarningSent = s.IsWarningSent,
};

private readonly MsSqlContextFactory<StakingContext> _contextFactory;
private readonly PostgreSQLContextFactory<StakingContext> _contextFactory;

public ReferralStakesRepository(MsSqlContextFactory<StakingContext> contextFactory)
public ReferralStakesRepository(PostgreSQLContextFactory<StakingContext> contextFactory)
{
_contextFactory = contextFactory;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using System.Threading.Tasks;
using MAVN.Common.MsSql;
using System.Threading.Tasks;
using MAVN.Persistence.PostgreSQL.Legacy;
using MAVN.Service.Staking.Domain.Models;
using MAVN.Service.Staking.Domain.Repositories;
using MAVN.Service.Staking.MsSqlRepositories.Entities;
Expand All @@ -9,9 +9,9 @@ namespace MAVN.Service.Staking.MsSqlRepositories.Repositories
{
public class StakesBlockchainDataRepository : IStakesBlockchainDataRepository
{
private readonly MsSqlContextFactory<StakingContext> _contextFactory;
private readonly PostgreSQLContextFactory<StakingContext> _contextFactory;

public StakesBlockchainDataRepository(MsSqlContextFactory<StakingContext> contextFactory)
public StakesBlockchainDataRepository(PostgreSQLContextFactory<StakingContext> contextFactory)
{
_contextFactory = contextFactory;
}
Expand Down
8 changes: 4 additions & 4 deletions src/MAVN.Service.Staking.MsSqlRepositories/StakingContext.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
using System.Data.Common;
using MAVN.Common.MsSql;
using System.Data.Common;
using MAVN.Persistence.PostgreSQL.Legacy;
using MAVN.Service.Staking.MsSqlRepositories.Entities;
using Microsoft.EntityFrameworkCore;

namespace MAVN.Service.Staking.MsSqlRepositories
{
public class StakingContext : MsSqlContext
public class StakingContext : PostgreSQLContext
{
private const string Schema = "staking";

Expand All @@ -29,7 +29,7 @@ public StakingContext(DbContextOptions contextOptions) : base(Schema, contextOpt
{
}

protected override void OnLykkeModelCreating(ModelBuilder modelBuilder)
protected override void OnMAVNModelCreating(ModelBuilder modelBuilder)
{
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/MAVN.Service.Staking/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM microsoft/dotnet:2.2-aspnetcore-runtime
FROM microsoft/dotnet:3.1-aspnetcore-runtime
WORKDIR /app
COPY . .
ENTRYPOINT ["dotnet", "MAVN.Service.Staking.dll"]
12 changes: 8 additions & 4 deletions src/MAVN.Service.Staking/MAVN.Service.Staking.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
<OutputType>Exe</OutputType>
<Version>1.0.0</Version>
</PropertyGroup>
Expand All @@ -13,13 +13,17 @@
<LangVersion>latest</LangVersion>
</PropertyGroup>
<ItemGroup>
<None Update="appsettings.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="Dockerfile">
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
</None>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Lykke.Sdk" Version="5.17.0" />
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.13.1" />
<PackageReference Include="Lykke.Logs" Version="7.4.0" />
<PackageReference Include="Lykke.Sdk" Version="5.18.0" />
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.14.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\client\MAVN.Service.Staking.Client\MAVN.Service.Staking.Client.csproj" />
Expand Down
6 changes: 3 additions & 3 deletions src/MAVN.Service.Staking/Modules/DataLayerModule.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
using Autofac;
using Autofac;
using JetBrains.Annotations;
using MAVN.Common.MsSql;
using MAVN.Service.Staking.Domain.Repositories;
using MAVN.Service.Staking.MsSqlRepositories;
using MAVN.Service.Staking.MsSqlRepositories.Repositories;
using MAVN.Service.Staking.Settings;
using Lykke.SettingsReader;
using MAVN.Persistence.PostgreSQL.Legacy;

namespace MAVN.Service.Staking.Modules
{
Expand All @@ -21,7 +21,7 @@ public DataLayerModule(IReloadingManager<AppSettings> appSettings)

protected override void Load(ContainerBuilder builder)
{
builder.RegisterMsSql(
builder.RegisterPostgreSQL(
_settings.DataConnString,
connString => new StakingContext(connString, false),
dbConn => new StakingContext(dbConn));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
<Version>1.0.0</Version>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="coverlet.msbuild" Version="2.8.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.5.0" />
<PackageReference Include="Moq" Version="4.13.1" />
<PackageReference Include="coverlet.msbuild" Version="2.9.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.6.1" />
<PackageReference Include="Moq" Version="4.14.5" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1">
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using System;
using System.Threading.Tasks;
using MAVN.Common.MsSql;
using Lykke.Logs;
using Lykke.RabbitMqBroker.Publisher;
using MAVN.Persistence.PostgreSQL.Legacy;
using MAVN.Service.Campaign.Client;
using MAVN.Service.Campaign.Client.Models.Campaign.Responses;
using MAVN.Service.Campaign.Client.Models.Enums;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using System.Threading.Tasks;
using MAVN.Common.MsSql;
using Lykke.RabbitMqBroker.Publisher;
using MAVN.Persistence.PostgreSQL.Legacy;
using MAVN.Service.PrivateBlockchainFacade.Client;
using MAVN.Service.PrivateBlockchainFacade.Client.Models;
using MAVN.Service.Staking.Contract.Events;
Expand Down

0 comments on commit 965b852

Please sign in to comment.