diff --git a/.evergreen/config.yml b/.evergreen/config.yml index 8e49030..7c72f2b 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -119,10 +119,18 @@ tasks: - func: "setup remote atlas" - func: "execute tests" - - name: test-semantic-kernel-csharp + - name: test-semantic-kernel-csharp-local tags: [local] commands: - func: "fetch repo" + - func: "setup local atlas" + - func: "execute tests" + + - name: test-semantic-kernel-csharp-remote + tags: [remote] + commands: + - func: "fetch repo" + - func: "setup remote atlas" - func: "execute tests" - name: test-langchain-python-local @@ -311,7 +319,8 @@ buildvariants: run_on: - rhel87-small tasks: - - name: test-semantic-kernel-csharp + - name: test-semantic-kernel-csharp-local + - name: test-semantic-kernel-csharp-remote batchtime: 10080 # 1 week - name: test-langchain-python-rhel diff --git a/semantic-kernel-csharp/config.env b/semantic-kernel-csharp/config.env index 5277798..b3e1248 100644 --- a/semantic-kernel-csharp/config.env +++ b/semantic-kernel-csharp/config.env @@ -1,2 +1,3 @@ REPO_NAME=semantic-kernel REPO_ORG=microsoft +DATABASE=semantic-kernel diff --git a/semantic-kernel-csharp/run.sh b/semantic-kernel-csharp/run.sh index 55355ee..3032184 100644 --- a/semantic-kernel-csharp/run.sh +++ b/semantic-kernel-csharp/run.sh @@ -2,12 +2,18 @@ set -eu +# Get the MONGODB_URI +SCRIPT_DIR=$(realpath "$(dirname ${BASH_SOURCE[0]})") +ROOT_DIR=$(dirname $SCRIPT_DIR) +. $ROOT_DIR/env.sh + +. $ROOT_DIR/.evergreen/utils.sh + # WORKING_DIR = $ROOT_DIR/semantic-kernel-csharp/semantic-kernel # Install .NET DOTNET_SDK_PATH=./.dotnet mkdir -p "$DOTNET_SDK_PATH" - echo "Downloading .NET SDK installer into $DOTNET_SDK_PATH folder..." curl -Lfo "$DOTNET_SDK_PATH"/dotnet-install.sh https://dot.net/v1/dotnet-install.sh echo "Installing .NET 9.0 SDK..." @@ -15,21 +21,12 @@ bash "$DOTNET_SDK_PATH"/dotnet-install.sh --channel 9.0 --install-dir "$DOTNET_S echo "Installing .NET 8.0 runtime..." bash "$DOTNET_SDK_PATH"/dotnet-install.sh --channel 8.0 --install-dir "$DOTNET_SDK_PATH" --no-path --runtime dotnet -# The tests use the TestContainers.Net library which requires docker. -# RHEL 8 and 9 don't support docker so we have the setup below to emulate docker with podman -sudo dnf install -y docker - -# Enable and start Podman's socket service to listen for Docker API calls -sudo systemctl enable --now podman.socket - -# Point docker commands to use the podman socket -export DOCKER_HOST="unix:///run/podman/podman.sock" - -# Set SkipReason to null to enable tests -sed -i -e 's/"The MongoDB container is intermittently timing out at startup time blocking prs, so these test should be run manually."/null/g' dotnet/src/IntegrationTests/Connectors/Memory/MongoDB/MongoDBVectorStoreRecordCollectionTests.cs +# Enable MongoDB.ConformanceTests +sed -i -e '/\[assembly: DisableTests/d' dotnet/test/VectorData/MongoDB.ConformanceTests/Properties/AssemblyInfo.cs -# Remove the attribute blocking tests so we can run them -sed -i -e 's/\[DisableVectorStoreTests(Skip = "The MongoDB container is intermittently timing out at startup time blocking prs, so these test should be run manually.")\]//g' dotnet/src/IntegrationTests/Connectors/Memory/MongoDB/MongoDBVectorStoreTests.cs +# Export the MongoDB connection string +export MONGODB__CONNECTIONURL=$MONGODB_URI -echo "Running MongoDBVectorStoreTests" -sudo $DOTNET_SDK_PATH/dotnet test dotnet/src/IntegrationTests/IntegrationTests.csproj --filter "SemanticKernel.IntegrationTests.Connectors.MongoDB.MongoDBVectorStoreTests" +# Run tests +echo "Running MongoDB.ConformanceTests" +$DOTNET_SDK_PATH/dotnet test dotnet/test/VectorData/MongoDB.ConformanceTests/MongoDB.ConformanceTests.csproj --framework net8.0