Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,6 @@ jobs:
timeout-minutes: 20

steps:

- name: Setup .NET 7
uses: actions/setup-dotnet@v1
with:
dotnet-version: 7.0.x

- name: Setup .NET 8
uses: actions/setup-dotnet@v1
with:
Expand Down
65 changes: 65 additions & 0 deletions .github/workflows/http.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: http

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

env:
config: Release
disable_test_parallelization: true
ASPNETCORE_ENVIRONMENT: Development

jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 20

steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup .NET 8
uses: actions/setup-dotnet@v1
with:
dotnet-version: 8.0.x

- name: Setup .NET 9
uses: actions/setup-dotnet@v1
with:
dotnet-version: 9.0.x

- name: Setup .NET 10
uses: actions/setup-dotnet@v1
with:
dotnet-version: 10.0.x

- name: Start PostgreSQL
run: docker compose up -d postgresql

- name: Wait for PostgreSQL
run: |
echo "Waiting for PostgreSQL to be ready..."
for i in {1..30}; do
if docker compose exec -T postgresql pg_isready -U postgres; then
echo "PostgreSQL is ready"
exit 0
fi
echo "Attempt $i: PostgreSQL not ready yet, waiting..."
sleep 2
done
echo "PostgreSQL failed to start"
exit 1

- name: Build
run: dotnet build src/Http/Wolverine.Http.Tests/Wolverine.Http.Tests.csproj --framework net9.0 --configuration ${{ env.config }}

- name: Test
run: dotnet test src/Http/Wolverine.Http.Tests/Wolverine.Http.Tests.csproj -e Development --framework net9.0 --configuration ${{ env.config }} --no-build --logger "GitHubActions;summary.includePassedTests=true;summary.includeSkippedTests=true"

- name: Stop containers
if: always()
run: docker compose down
111 changes: 111 additions & 0 deletions .github/workflows/persistence.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
name: persistence

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

env:
config: Release
disable_test_parallelization: true

jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 30

steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup .NET 8
uses: actions/setup-dotnet@v1
with:
dotnet-version: 8.0.x

- name: Setup .NET 9
uses: actions/setup-dotnet@v1
with:
dotnet-version: 9.0.x

- name: Setup .NET 10
uses: actions/setup-dotnet@v1
with:
dotnet-version: 10.0.x

- name: Start containers
run: docker compose up -d postgresql sqlserver mysql rabbitmq

- name: Build
run: |
dotnet build src/Persistence/PersistenceTests/PersistenceTests.csproj --configuration ${{ env.config }} --framework net9.0
dotnet build src/Persistence/PostgresqlTests/PostgresqlTests.csproj --configuration ${{ env.config }} --framework net10.0
dotnet build src/Persistence/SqlServerTests/SqlServerTests.csproj --configuration ${{ env.config }} --framework net10.0
dotnet build src/Persistence/MySql/MySqlTests/MySqlTests.csproj --configuration ${{ env.config }} --framework net10.0

- name: Wait for PostgreSQL
run: |
echo "Waiting for PostgreSQL to be ready..."
for i in {1..30}; do
if docker compose exec -T postgresql pg_isready -U postgres; then
echo "PostgreSQL is ready"
break
fi
echo "Attempt $i: PostgreSQL not ready yet, waiting..."
sleep 2
done

- name: Wait for MySQL
run: |
echo "Waiting for MySQL to be ready..."
for i in {1..30}; do
if docker compose exec -T mysql mysqladmin ping -h localhost -u root -pP@55w0rd --silent; then
echo "MySQL is ready"
break
fi
echo "Attempt $i: MySQL not ready yet, waiting..."
sleep 2
done

- name: Wait for RabbitMQ
run: |
echo "Waiting for RabbitMQ to be ready..."
for i in {1..30}; do
if docker compose exec -T rabbitmq rabbitmq-diagnostics -q ping; then
echo "RabbitMQ is ready"
break
fi
echo "Attempt $i: RabbitMQ not ready yet, waiting..."
sleep 2
done

- name: Test MySqlTests
run: dotnet test src/Persistence/MySql/MySqlTests/MySqlTests.csproj --configuration ${{ env.config }} --framework net10.0 --no-build --logger "GitHubActions;summary.includePassedTests=true;summary.includeSkippedTests=true"

- name: Test PersistenceTests
run: dotnet test src/Persistence/PersistenceTests/PersistenceTests.csproj --configuration ${{ env.config }} --framework net9.0 --no-build --logger "GitHubActions;summary.includePassedTests=true;summary.includeSkippedTests=true"

- name: Wait for SQL Server
run: |
echo "Waiting for SQL Server to be ready..."
for i in {1..30}; do
if docker compose exec -T sqlserver /opt/mssql-tools18/bin/sqlcmd -S localhost -U sa -P 'P@55w0rd' -C -Q "SELECT 1" > /dev/null 2>&1; then
echo "SQL Server is ready"
break
fi
echo "Attempt $i: SQL Server not ready yet, waiting..."
sleep 2
done

- name: Test SqlServerTests
run: dotnet test src/Persistence/SqlServerTests/SqlServerTests.csproj --configuration ${{ env.config }} --framework net10.0 --no-build --logger "GitHubActions;summary.includePassedTests=true;summary.includeSkippedTests=true"

- name: Test PostgresqlTests
run: dotnet test src/Persistence/PostgresqlTests/PostgresqlTests.csproj --configuration ${{ env.config }} --framework net10.0 --no-build --logger "GitHubActions;summary.includePassedTests=true;summary.includeSkippedTests=true"

- name: Stop containers
if: always()
run: docker compose down
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<Project Sdk="Microsoft.NET.Sdk">

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

<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App"/>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
<PackageReference Include="GitHubActionsTestLogger" Version="2.4.1" PrivateAssets="All" />
<PackageReference Include="xunit" Version="2.9.0"/>
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\Wolverine.RDBMS\Wolverine.RDBMS.csproj"/>
<ProjectReference Include="..\..\MySql\Wolverine.MySql\Wolverine.MySql.csproj"/>
<ProjectReference Include="..\..\..\Testing\Wolverine.ComplianceTests\Wolverine.ComplianceTests.csproj" />
</ItemGroup>

<ItemGroup>
<Content Include="$(SolutionDir)xunit.runner.json" CopyToOutputDirectory="PreserveNewest"/>
</ItemGroup>

<ItemGroup>
<Compile Include="..\..\..\Servers.cs">
<Link>Servers.cs</Link>
</Compile>
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using Wolverine.MySql;
using Xunit.Abstractions;

namespace MySqlTests.Agents;
namespace MySqlTests.LeaderElection;

public class leader_election : LeadershipElectionCompliance
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<Project Sdk="Microsoft.NET.Sdk">

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

<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App"/>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
<PackageReference Include="GitHubActionsTestLogger" Version="2.4.1" PrivateAssets="All" />
<PackageReference Include="xunit" Version="2.9.0"/>
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\Wolverine.RDBMS\Wolverine.RDBMS.csproj"/>
<ProjectReference Include="..\..\Wolverine.Postgresql\Wolverine.Postgresql.csproj"/>
<ProjectReference Include="..\..\..\Testing\Wolverine.ComplianceTests\Wolverine.ComplianceTests.csproj" />
</ItemGroup>

<ItemGroup>
<Content Include="$(SolutionDir)xunit.runner.json" CopyToOutputDirectory="PreserveNewest"/>
</ItemGroup>

<ItemGroup>
<Compile Include="..\..\..\Servers.cs">
<Link>Servers.cs</Link>
</Compile>
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
using Wolverine;
using Wolverine.ComplianceTests;
using Wolverine.Postgresql;
using Xunit;
using Xunit.Abstractions;

namespace PostgresqlTests.Agents;
namespace PostgresqlTests.LeaderElection;

[Collection("marten")]
public class leader_election : LeadershipElectionCompliance
Expand All @@ -27,4 +28,4 @@ protected override async Task beforeBuildingHost()
await conn.DropSchemaAsync("registry");
await conn.CloseAsync();
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
</PropertyGroup>

<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App"/>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
<PackageReference Include="GitHubActionsTestLogger" Version="2.4.1" PrivateAssets="All" />
<PackageReference Include="xunit" Version="2.9.0"/>
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<Using Include="Xunit"/>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\Testing\Wolverine.ComplianceTests\Wolverine.ComplianceTests.csproj" />
<ProjectReference Include="..\..\Wolverine.RavenDb\Wolverine.RavenDb.csproj" />
<ProjectReference Include="..\..\RavenDbTests\RavenDbTests.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@
using Wolverine.Transports.Tcp;
using Wolverine.Util;
using Xunit.Abstractions;
using RavenDbTests;

namespace RavenDbTests;
namespace RavenDbTests.LeaderElection;

[Collection("raven")]
public class leadership_election_compliance : LeadershipElectionCompliance
Expand All @@ -33,8 +34,8 @@ protected override void configureNode(WolverineOptions options)
options.UseTcpForControlEndpoint();

options.ServiceName = "raven";

options.Services.AddSingleton(_store);
options.UseRavenDbPersistence();
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
<PackageReference Include="GitHubActionsTestLogger" Version="2.4.1" PrivateAssets="All" />
<PackageReference Include="xunit" Version="2.9.0"/>
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<Compile Include="..\..\..\Servers.cs">
<Link>Servers.cs</Link>
</Compile>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\Testing\Wolverine.ComplianceTests\Wolverine.ComplianceTests.csproj" />
<ProjectReference Include="..\..\Wolverine.SqlServer\Wolverine.SqlServer.csproj"/>
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using Wolverine.SqlServer;
using Xunit.Abstractions;

namespace SqlServerTests.Agents;
namespace SqlServerTests.LeaderElection;

public class leader_election : LeadershipElectionCompliance
{
Expand All @@ -26,4 +26,4 @@ protected override async Task beforeBuildingHost()
await conn.DropSchemaAsync("registry");
await conn.CloseAsync();
}
}
}
Loading
Loading