Skip to content

Commit 30781e3

Browse files
authored
Merge pull request danielgerlag#1111 from glucaci/addMySqlToBuild
Fix MySQL tests and integrate into PR build
2 parents e00d53b + 1362384 commit 30781e3

File tree

3 files changed

+22
-4
lines changed

3 files changed

+22
-4
lines changed

.github/workflows/dotnet.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,22 @@ jobs:
5555
run: dotnet build --no-restore
5656
- name: MongoDB Tests
5757
run: dotnet test test/WorkflowCore.Tests.MongoDB --no-build --verbosity normal -p:ParallelizeTestCollections=false
58+
MySQL-Tests:
59+
runs-on: ubuntu-latest
60+
steps:
61+
- uses: actions/checkout@v2
62+
- name: Setup .NET
63+
uses: actions/setup-dotnet@v1
64+
with:
65+
dotnet-version: |
66+
3.1.x
67+
6.0.x
68+
- name: Restore dependencies
69+
run: dotnet restore
70+
- name: Build
71+
run: dotnet build --no-restore
72+
- name: MySQL Tests
73+
run: dotnet test test/WorkflowCore.Tests.MySQL --no-build --verbosity normal -p:ParallelizeTestCollections=false
5874
PostgreSQL-Tests:
5975
runs-on: ubuntu-latest
6076
steps:

test/WorkflowCore.Tests.MySQL/DockerSetup.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,18 @@ public MysqlDockerSetup()
1919
public async Task InitializeAsync()
2020
{
2121
await _mySqlResource.InitializeAsync();
22-
ConnectionString = _mySqlResource.ConnectionString;
23-
ScenarioConnectionString = _mySqlResource.ConnectionString;
22+
var workflowConnection = await _mySqlResource.CreateDatabaseAsync("workflow");
23+
ConnectionString = workflowConnection.ConnectionString;
24+
var scenariosConnection = await _mySqlResource.CreateDatabaseAsync("scenarios");
25+
ScenarioConnectionString = scenariosConnection.ConnectionString;
2426
}
2527

2628
public Task DisposeAsync()
2729
{
2830
return _mySqlResource.DisposeAsync();
2931
}
3032
}
31-
33+
3234
[CollectionDefinition("Mysql collection")]
3335
public class MysqlCollection : ICollectionFixture<MysqlDockerSetup>
3436
{

test/WorkflowCore.Tests.MySQL/WorkflowCore.Tests.MySQL.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<ItemGroup>
4-
<PackageReference Include="Squadron.MySql" Version="0.17.0" />
4+
<PackageReference Include="Squadron.MySql" Version="0.18.0-preview.7" />
55
</ItemGroup>
66

77
<ItemGroup>

0 commit comments

Comments
 (0)