Skip to content

Commit 2b278cc

Browse files
ArneSchoonvlietArne Schoonvliet
andauthored
Upgrade to .net 6 and all nuget dependencies to latest version (SQLStreamStore#1)
* WIP * Fix tests * Build improvements * Fix build * Make build work * Use correct image * Fix pgsql v2 build * Try again * Fix build * Use stable .net 6 sdk * diagnostic logging * Set RID to make test work * WIP versioning * Fix build * Add migration from schema v1 to schema v2 * Make build work * WORK * WORK * FIXIT * Does this work? * WIP * Fix build * Make build work * Use other image for ci and pr build * Test build with updated csproj * Remove unused reference Co-authored-by: Arne Schoonvliet <arne@intigriti.com>
1 parent 80189cd commit 2b278cc

107 files changed

Lines changed: 2991 additions & 123 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/ci.yaml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
strategy:
1414
fail-fast: false
1515
matrix:
16-
test: ["inmem", "mssql", "mssql-v3", "mysql", "postgres", "sqlite", "hal", "http"]
16+
test: ["inmem", "mssql", "mssql-v3", "mysql", "postgres", "postgres-v2", "sqlite", "hal", "http"]
1717

1818
runs-on: ubuntu-latest
1919
name: Test ${{ matrix.test }}
@@ -46,7 +46,7 @@ jobs:
4646
fetch-depth: 0
4747
- name: Pull Containers
4848
shell: bash
49-
run: docker pull damianh/dotnet-core-lts-sdks:1
49+
run: docker pull alpinelinux/docker-cli:latest-x86_64
5050
- name: Build and Test
5151
shell: bash
5252
run: ./build.sh test-${{ matrix.test }}

‎.github/workflows/pr.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
strategy:
99
fail-fast: false
1010
matrix:
11-
test: ["inmem", "mssql", "mssql-v3", "mysql", "postgres", "sqlite", "hal", "http"]
11+
test: ["inmem", "mssql", "mssql-v3", "mysql", "postgres", "postgres-v2", "sqlite", "hal", "http"]
1212

1313
runs-on: ubuntu-latest
1414
name: Test ${{ matrix.test }}
@@ -41,7 +41,7 @@ jobs:
4141
fetch-depth: 0
4242
- name: Pull Containers
4343
shell: bash
44-
run: docker pull damianh/dotnet-core-lts-sdks:1
44+
run: docker pull alpinelinux/docker-cli:latest-x86_64
4545
- name: Build and Test
4646
shell: bash
4747
run: ./build.sh test-${{ matrix.test }}

‎.vscode/launch.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"request": "launch",
1111
"preLaunchTask": "build",
1212
// If you have changed target frameworks, make sure to update the program path.
13-
"program": "${workspaceFolder}/src/LoadTests/bin/Debug/netcoreapp2.0/LoadTests.dll",
13+
"program": "${workspaceFolder}/src/LoadTests/bin/Debug/net6.0/LoadTests.dll",
1414
"args": [],
1515
"cwd": "${workspaceFolder}/src/LoadTests",
1616
// For more information about the 'console' field, see https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md#console-terminal-window

‎Dockerfile‎

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,19 @@
1-
FROM damianh/dotnet-core-lts-sdks:2
1+
FROM mcr.microsoft.com/dotnet/sdk:6.0-focal
2+
3+
RUN apt-get update \
4+
&& apt-get install git \
5+
&& apt-get install \
6+
ca-certificates \
7+
curl \
8+
gnupg \
9+
lsb-release -y \
10+
&& curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg \
11+
&& echo \
12+
"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
13+
$(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null \
14+
&& apt-get update \
15+
&& apt-get install docker-ce-cli -y \
16+
&& apt-get install zip -y
217

318
WORKDIR /repo
419

‎SqlStreamStore.sln‎

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio Version 16
4-
VisualStudioVersion = 16.0.29926.136
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.1.32120.378
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SqlStreamStore", "src\SqlStreamStore\SqlStreamStore.csproj", "{8F86833A-6686-409C-B0E4-6FBFB70F7DE1}"
77
EndProject
@@ -62,6 +62,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{845ED623-9F0
6262
EndProject
6363
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "build", "build\build.csproj", "{5273D70A-96D7-4775-B67C-BDE48D20CA36}"
6464
EndProject
65+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SqlStreamStore.Postgres.V2.Tests", "tests\SqlStreamStore.Postgres.V2.Tests\SqlStreamStore.Postgres.V2.Tests.csproj", "{A8D87EDC-E911-42F3-891F-82DEBBD4E0A3}"
66+
EndProject
67+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SqlStreamStore.PostgresV2", "src\SqlStreamStore.PostgresV2\SqlStreamStore.PostgresV2.csproj", "{D1FA4E2A-9113-4F8E-987D-DDC1C1C583E2}"
68+
EndProject
6569
Global
6670
GlobalSection(SolutionConfigurationPlatforms) = preSolution
6771
Debug|Any CPU = Debug|Any CPU
@@ -148,6 +152,14 @@ Global
148152
{5273D70A-96D7-4775-B67C-BDE48D20CA36}.Debug|Any CPU.Build.0 = Debug|Any CPU
149153
{5273D70A-96D7-4775-B67C-BDE48D20CA36}.Release|Any CPU.ActiveCfg = Release|Any CPU
150154
{5273D70A-96D7-4775-B67C-BDE48D20CA36}.Release|Any CPU.Build.0 = Release|Any CPU
155+
{A8D87EDC-E911-42F3-891F-82DEBBD4E0A3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
156+
{A8D87EDC-E911-42F3-891F-82DEBBD4E0A3}.Debug|Any CPU.Build.0 = Debug|Any CPU
157+
{A8D87EDC-E911-42F3-891F-82DEBBD4E0A3}.Release|Any CPU.ActiveCfg = Release|Any CPU
158+
{A8D87EDC-E911-42F3-891F-82DEBBD4E0A3}.Release|Any CPU.Build.0 = Release|Any CPU
159+
{D1FA4E2A-9113-4F8E-987D-DDC1C1C583E2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
160+
{D1FA4E2A-9113-4F8E-987D-DDC1C1C583E2}.Debug|Any CPU.Build.0 = Debug|Any CPU
161+
{D1FA4E2A-9113-4F8E-987D-DDC1C1C583E2}.Release|Any CPU.ActiveCfg = Release|Any CPU
162+
{D1FA4E2A-9113-4F8E-987D-DDC1C1C583E2}.Release|Any CPU.Build.0 = Release|Any CPU
151163
EndGlobalSection
152164
GlobalSection(SolutionProperties) = preSolution
153165
HideSolutionNode = FALSE

‎build-local.cmd‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
@ECHO OFF
22

3-
dotnet run -p build/build.csproj -- %*
3+
dotnet run --project build/build.csproj -- %*

‎build.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ docker run --rm --name sss-build \
88
--network host \
99
-e FEEDZ_SSS_API_KEY=$FEEDZ_SSS_API_KEY \
1010
sss-build \
11-
dotnet run -p /repo/build/build.csproj -- "$@"
11+
dotnet run --project /repo/build/build.csproj -- "$@"

‎build/Program.cs‎

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88

99
namespace build
1010
{
11+
using System.Text;
12+
1113
class Program
1214
{
1315
private const string ArtifactsDir = "artifacts";
@@ -20,6 +22,7 @@ class Program
2022
private const string TestMsSql = "test-mssql";
2123
private const string TestMsSqlV3 = "test-mssql-v3";
2224
private const string TestPostgres = "test-postgres";
25+
private const string TestPostgresV2 = "test-postgres-v2";
2326
private const string TestSqlite = "test-sqlite";
2427
private const string TestHal = "test-hal";
2528
private const string TestHttp = "test-http";
@@ -59,11 +62,10 @@ void RunTest(string project)
5962
{
6063
try
6164
{
62-
Run("dotnet",
63-
$"test tests/{project}/{project}.csproj --configuration=Release --no-build --no-restore --verbosity=normal"
64-
+ $" --logger \"trx;logfilename=..\\..\\..\\{ArtifactsDir}\\{project}.trx\"");
65+
Run("dotnet", $"test tests/{project}/{project}.csproj --configuration=Release --no-build --no-restore --verbosity=normal" +
66+
$" --logger \"trx;logfilename=..\\..\\..\\{ArtifactsDir}\\{project}.trx\"");
6567
}
66-
catch (NonZeroExitCodeException) when (ShouldCatch())
68+
catch (ExitCodeException) when (ShouldCatch())
6769
{
6870
TestProjectsWithFailures.Add(project);
6971
}
@@ -106,6 +108,11 @@ void RunTest(string project)
106108
DependsOn(Build),
107109
() => RunTest("SqlStreamStore.Postgres.Tests"));
108110

111+
Target(
112+
TestPostgresV2,
113+
DependsOn(Build),
114+
() => RunTest("SqlStreamStore.Postgres.V2.Tests"));
115+
109116
Target(
110117
TestSqlite,
111118
DependsOn(Build),
@@ -123,6 +130,7 @@ void RunTest(string project)
123130
"SqlStreamStore.MsSql",
124131
"SqlStreamStore.MySql",
125132
"SqlStreamStore.Postgres",
133+
"SqlStreamStore.PostgresV2",
126134
"SqlStreamStore.HAL",
127135
"SqlStreamStore.Http",
128136
"SqlStreamStore.Sqlite",

‎build/build.csproj‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>netcoreapp3.1</TargetFramework>
5+
<TargetFramework>net6.0</TargetFramework>
66
</PropertyGroup>
77

88
<ItemGroup>
9-
<PackageReference Include="Bullseye" Version="3.3.0" />
10-
<PackageReference Include="SimpleExec" Version="6.2.0" />
9+
<PackageReference Include="Bullseye" Version="3.8.0" />
10+
<PackageReference Include="SimpleExec" Version="8.0.0" />
1111
</ItemGroup>
1212

1313
</Project>

‎src/Directory.Build.props‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@
99
<NoWarn>$(NoWarn);1701;1702;1705;1591</NoWarn>
1010
<LangVersion>7.3</LangVersion>
1111
<MinVerTagPrefix>v</MinVerTagPrefix>
12-
<MinVerMinimumMajorMinor>1.2</MinVerMinimumMajorMinor>
12+
<MinVerMinimumMajorMinor>1.3</MinVerMinimumMajorMinor>
1313
<DebugType>full</DebugType>
1414
<PublishRepositoryUrl>true</PublishRepositoryUrl>
1515
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
1616
</PropertyGroup>
1717
<ItemGroup>
18-
<PackageReference Include="MinVer" Version="2.3.1" PrivateAssets="All" />
19-
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All"/>
18+
<PackageReference Include="MinVer" Version="2.5.0" PrivateAssets="All" />
19+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.0" PrivateAssets="All"/>
2020
</ItemGroup>
2121
<Target Name="Adjust_Version_1_Releases_AssemblyVersion" AfterTargets="MinVer" Condition="'$(MinVerMajor)' == '1'">
2222
<PropertyGroup>

0 commit comments

Comments
 (0)