diff --git a/.github/workflows/Build.yml b/.github/workflows/Build.yml index 4ba3267..0c97bb2 100644 --- a/.github/workflows/Build.yml +++ b/.github/workflows/Build.yml @@ -12,9 +12,7 @@ jobs: strategy: matrix: - # TODO: Test against latest previews too. This currently doesn't work because preview releases don't publish - # a milvus-standalone-docker-compose.yml - milvus_version: [v2.3.10] + milvus_version: [v2.3.10, v2.4.0-rc.1] steps: - name: Checkout @@ -28,6 +26,8 @@ jobs: - name: Test run: dotnet test --logger "GitHubActions;report-warnings=false" + env: + MILVUS_IMAGE: milvusdb/milvus:${{ matrix.milvus_version }} - name: Pack run: dotnet pack -c Release -o Artifacts diff --git a/Milvus.Client.Tests/CollectionTests.cs b/Milvus.Client.Tests/CollectionTests.cs index d32a03f..5bfd71a 100644 --- a/Milvus.Client.Tests/CollectionTests.cs +++ b/Milvus.Client.Tests/CollectionTests.cs @@ -287,8 +287,13 @@ public async Task Compact() }); long compactionId = await collection.CompactAsync(); - Assert.NotEqual(0, compactionId); + if ((await Client.GetVersionAsync()).StartsWith("v2.4.", StringComparison.Ordinal)) + { + // Milvus 2.4 returns -1 here as the compaction ID + return; + } + Assert.NotEqual(0, compactionId); await Client.WaitForCompactionAsync(compactionId); CompactionState state = await Client.GetCompactionStateAsync(compactionId); diff --git a/Milvus.Client.Tests/MilvusFixture.cs b/Milvus.Client.Tests/MilvusFixture.cs index b2ebebb..76b4042 100644 --- a/Milvus.Client.Tests/MilvusFixture.cs +++ b/Milvus.Client.Tests/MilvusFixture.cs @@ -8,7 +8,11 @@ public sealed class MilvusTestCollection : ICollectionFixture; public sealed class MilvusFixture : IAsyncLifetime { - private readonly MilvusContainer _container = new MilvusBuilder().Build(); + private const string DefaultMilvusImage = "milvusdb/milvus:v2.4.0-rc.1"; + + private readonly MilvusContainer _container = new MilvusBuilder() + .WithImage(Environment.GetEnvironmentVariable("MILVUS_IMAGE") ?? DefaultMilvusImage) + .Build(); public string Host => _container.Hostname; public int Port => _container.GetMappedPublicPort(MilvusBuilder.MilvusGrpcPort); diff --git a/Version.props b/Version.props index a8fd0af..5b989cb 100644 --- a/Version.props +++ b/Version.props @@ -1,5 +1,5 @@ - 2.3.0 + 2.4.0