-
-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* moved to Central Package Management * migration to dotnet 7 * packages upgrade * code fix after upgrade * fixed docker-compose and prepopulation of mssql
- Loading branch information
1 parent
6e2cae0
commit 75a6d4c
Showing
19 changed files
with
153 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,18 @@ | ||
<Project> | ||
<PropertyGroup> | ||
<LangVersion>10</LangVersion> | ||
<TargetFramework>net6.0</TargetFramework> | ||
<LangVersion>11</LangVersion> | ||
<TargetFramework>net7.0</TargetFramework> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup> | ||
<Authors>Łukasz Kurzyniec</Authors> | ||
<Copyright>Copyright © happy+code Łukasz Kurzyniec 2022</Copyright> | ||
<Version>1.2.1</Version> | ||
<Version>1.3.0</Version> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup> | ||
<RunAnalyzersDuringBuild>true</RunAnalyzersDuringBuild> | ||
<RunAnalyzersDuringLiveAnalysis>true</RunAnalyzersDuringLiveAnalysis> | ||
<CodeAnalysisRuleSet>$(MSBuildThisFileDirectory)HappyCode.NetCoreBoilerplate.ruleset</CodeAnalysisRuleSet> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.3"> | ||
<PrivateAssets>all</PrivateAssets> | ||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | ||
</PackageReference> | ||
</ItemGroup> | ||
<ItemGroup Condition="'$(ProjectName.EndsWith(`Tests`))' == 'False'"> | ||
<PackageReference Include="Microsoft.VisualStudio.Threading.Analyzers" Version="17.4.33"> | ||
<PrivateAssets>all</PrivateAssets> | ||
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> | ||
</PackageReference> | ||
</ItemGroup> | ||
</PropertyGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
<Project> | ||
<PropertyGroup> | ||
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally> | ||
<EnablePackageVersionOverride>false</EnablePackageVersionOverride> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<PackageVersion Include="AspNetCore.HealthChecks.MySql" Version="6.0.2" /> | ||
<PackageVersion Include="AspNetCore.HealthChecks.SqlServer" Version="6.0.2" /> | ||
<PackageVersion Include="AspNetCore.HealthChecks.UI.Client" Version="6.0.5" /> | ||
<PackageVersion Include="Microsoft.FeatureManagement.AspNetCore" Version="2.5.1" /> | ||
<PackageVersion Include="Serilog.AspNetCore" Version="6.1.0" /> | ||
<PackageVersion Include="Serilog.Enrichers.Environment" Version="2.2.0" /> | ||
<PackageVersion Include="Serilog.Sinks.Async" Version="1.5.0" /> | ||
<PackageVersion Include="Swashbuckle.AspNetCore" Version="6.5.0" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<PackageVersion Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.2" /> | ||
<PackageVersion Include="Pomelo.EntityFrameworkCore.MySql" Version="7.0.0" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<PackageVersion Include="dbup-sqlserver" Version="5.0.8" /> | ||
<PackageVersion Include="Microsoft.Extensions.Configuration.Binder" Version="7.0.2" /> | ||
<PackageVersion Include="Microsoft.Extensions.Configuration.Json" Version="7.0.0" /> | ||
<PackageVersion Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="7.0.0" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<PackageVersion Include="AutoFixture" Version="4.17.0" /> | ||
<PackageVersion Include="AutoFixture.Xunit2" Version="4.17.0" /> | ||
<PackageVersion Include="coverlet.msbuild" Version="3.2.0"> | ||
<PrivateAssets>all</PrivateAssets> | ||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | ||
</PackageVersion> | ||
<PackageVersion Include="FluentAssertions" Version="6.9.0" /> | ||
<PackageVersion Include="Microsoft.EntityFrameworkCore.InMemory" Version="7.0.2" /> | ||
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.4.1" /> | ||
<PackageVersion Include="Microsoft.AspNetCore.TestHost" Version="7.0.2" /> | ||
<PackageVersion Include="MockQueryable.Moq" Version="7.0.0" /> | ||
<PackageVersion Include="Moq" Version="4.18.4" /> | ||
<PackageVersion Include="Moq.AutoMock" Version="3.5.0" /> | ||
<PackageVersion Include="NBomber.Http" Version="1.1.1" /> | ||
<PackageVersion Include="Verify.Http" Version="4.1.0" /> | ||
<PackageVersion Include="Verify.Xunit" Version="19.7.1" /> | ||
<PackageVersion Include="xunit" Version="2.4.2" /> | ||
<PackageVersion Include="xunit.runner.visualstudio" Version="2.4.5"> | ||
<PrivateAssets>all</PrivateAssets> | ||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | ||
</PackageVersion> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<GlobalPackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.4"> | ||
<PrivateAssets>all</PrivateAssets> | ||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | ||
</GlobalPackageReference> | ||
</ItemGroup> | ||
<ItemGroup Condition="'$(ProjectName.EndsWith(`Tests`))' == 'False'"> | ||
<GlobalPackageReference Include="Microsoft.VisualStudio.Threading.Analyzers" Version="17.4.33"> | ||
<PrivateAssets>all</PrivateAssets> | ||
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> | ||
</GlobalPackageReference> | ||
</ItemGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
#wait for the SQL Server to come up | ||
sleep 30s | ||
#!/bin/bash | ||
|
||
echo "running set up script" | ||
#run the setup script to create the DB and the schema in the DB | ||
/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P SomeStrongPwd123 -d master -i db-init.sql | ||
echo "waiting 20s for the SQL Server to come up..." | ||
sleep 20s | ||
|
||
echo "running set up script..." | ||
/opt/mssql-tools/bin/sqlcmd -S "localhost" -U sa -P "${MSSQL_SA_PASSWORD}" -d master -i db-init.sql |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
#start SQL Server, start the script to create/setup the DB | ||
/db-init.sh & /opt/mssql/bin/sqlservr | ||
#!/bin/bash | ||
/db-init.sh & /opt/mssql/bin/sqlservr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build | ||
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build | ||
WORKDIR /work | ||
|
||
COPY ./Directory.Build.props ./ | ||
COPY ./Directory.Packages.props ./ | ||
COPY src/*/*.csproj ./ | ||
RUN for projectFile in $(ls *.csproj); \ | ||
do \ | ||
mkdir -p ${projectFile%.*}/ && mv $projectFile ${projectFile%.*}/; \ | ||
done | ||
do \ | ||
mkdir -p ${projectFile%.*}/ && mv $projectFile ${projectFile%.*}/; \ | ||
done | ||
|
||
ENV DOTNET_NOLOGO=true | ||
ENV DOTNET_CLI_TELEMETRY_OPTOUT=true | ||
|
@@ -15,6 +16,8 @@ RUN dotnet restore /work/HappyCode.NetCoreBoilerplate.Api/HappyCode.NetCoreBoile | |
|
||
COPY src . | ||
|
||
# -------------- | ||
|
||
FROM build AS publish | ||
WORKDIR /work/HappyCode.NetCoreBoilerplate.Api | ||
|
||
|
@@ -23,9 +26,9 @@ ENV DOTNET_CLI_TELEMETRY_OPTOUT=true | |
|
||
RUN dotnet publish -c Release -o /app --no-restore | ||
|
||
LABEL maintainer="Lukasz Kurzyniec ([email protected])" | ||
# -------------- | ||
|
||
FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS final | ||
FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS final | ||
WORKDIR /app | ||
COPY --from=publish /app . | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 8 additions & 15 deletions
23
...Boilerplate.Api.IntegrationTests/HappyCode.NetCoreBoilerplate.Api.IntegrationTests.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,16 @@ | ||
<Project Sdk="Microsoft.NET.Sdk.Web"> | ||
<ItemGroup> | ||
<PackageReference Include="FluentAssertions" Version="6.8.0" /> | ||
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="6.0.10" /> | ||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.0" /> | ||
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="6.0.10" /> | ||
<PackageReference Include="Verify.Http" Version="3.0.0" /> | ||
<PackageReference Include="Verify.Xunit" Version="18.4.0" /> | ||
<PackageReference Include="xunit" Version="2.4.2" /> | ||
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5"> | ||
<PrivateAssets>all</PrivateAssets> | ||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | ||
</PackageReference> | ||
<PackageReference Include="FluentAssertions" /> | ||
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" /> | ||
<PackageReference Include="Microsoft.NET.Test.Sdk" /> | ||
<PackageReference Include="Microsoft.AspNetCore.TestHost" /> | ||
<PackageReference Include="Verify.Http" /> | ||
<PackageReference Include="Verify.Xunit" /> | ||
<PackageReference Include="xunit" /> | ||
<PackageReference Include="xunit.runner.visualstudio" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\..\src\HappyCode.NetCoreBoilerplate.Api\HappyCode.NetCoreBoilerplate.Api.csproj" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<Folder Include="Properties\" /> | ||
</ItemGroup> | ||
</Project> |
15 changes: 6 additions & 9 deletions
15
...pyCode.NetCoreBoilerplate.Api.LoadTests/HappyCode.NetCoreBoilerplate.Api.LoadTests.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,9 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<ItemGroup> | ||
<PackageReference Include="FluentAssertions" Version="6.8.0" /> | ||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.0" /> | ||
<PackageReference Include="NBomber.Http" Version="1.1.1" /> | ||
<PackageReference Include="xunit" Version="2.4.2" /> | ||
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5"> | ||
<PrivateAssets>all</PrivateAssets> | ||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | ||
</PackageReference> | ||
</ItemGroup> | ||
<PackageReference Include="FluentAssertions" /> | ||
<PackageReference Include="Microsoft.NET.Test.Sdk" /> | ||
<PackageReference Include="NBomber.Http" /> | ||
<PackageReference Include="xunit" /> | ||
<PackageReference Include="xunit.runner.visualstudio" /> | ||
</ItemGroup> | ||
</Project> |
Oops, something went wrong.