Add Semantic Kernel Vector Store Reaction #1393
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright 2024 The Drasi Authors. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, | |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
# See the License for the specific language governing permissions and | |
# limitations under the License. | |
name: Build and Test | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
- release/* | |
tags: | |
- v* | |
pull_request: | |
branches: | |
- main | |
- feature/* | |
- release/* | |
permissions: | |
contents: read | |
packages: write | |
jobs: | |
build-images: | |
permissions: | |
packages: write | |
contents: read | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
variant: [ | |
{ | |
name: 'default', | |
build_config: 'default', | |
drasi_version: 'latest' | |
}, | |
{ | |
name: 'azure-linux', | |
build_config: 'azure-linux', | |
drasi_version: 'latest-azure-linux' | |
} | |
# Future variants can be added here, e.g.: | |
# { | |
# name: 'alpine', | |
# build_config: 'alpine', | |
# drasi_version: 'latest-alpine' | |
# } | |
] | |
component: [ | |
# Query Container Components | |
{ | |
label: 'Query Host', | |
path: 'query-container/query-host', | |
name: 'query-container-query-host' | |
}, | |
{ | |
label: 'Publish API', | |
path: 'query-container/publish-api', | |
name: 'query-container-publish-api' | |
}, | |
{ | |
label: 'View Service', | |
path: 'query-container/view-svc', | |
name: 'query-container-view-svc' | |
}, | |
# Control Plane Components | |
{ | |
label: 'Management API', | |
path: 'control-planes/mgmt_api', | |
name: 'api' | |
}, | |
{ | |
label: 'k8s Resource Provider', | |
path: 'control-planes/kubernetes_provider', | |
name: 'kubernetes-provider' | |
}, | |
# Source Components | |
{ | |
label: 'Change Router', | |
path: 'sources/shared/change-router', | |
name: 'source-change-router' | |
}, | |
{ | |
label: 'Change Dispatcher', | |
path: 'sources/shared/change-dispatcher', | |
name: 'source-change-dispatcher' | |
}, | |
{ | |
label: 'Query API', | |
path: 'sources/shared/query-api', | |
name: 'source-query-api' | |
}, | |
{ | |
label: 'Debezium Reactivator', | |
path: 'sources/relational/debezium-reactivator', | |
name: 'source-debezium-reactivator' | |
}, | |
{ | |
label: 'SQL Proxy', | |
path: 'sources/relational/sql-proxy', | |
name: 'source-sql-proxy' | |
}, | |
{ | |
label: 'CosmosDB Reactivator', | |
path: './sources/cosmosdb/cosmosdb-ffcf-reactivator', | |
name: 'source-cosmosdb-reactivator' | |
}, | |
{ | |
label: 'Gremlin Proxy', | |
path: 'sources/cosmosdb/gremlin-proxy', | |
name: 'source-gremlin-proxy' | |
}, | |
{ | |
label: 'Dataverse Reactivator', | |
path: './sources/dataverse/dataverse-reactivator', | |
name: 'source-dataverse-reactivator' | |
}, | |
{ | |
label: 'Dataverse Proxy', | |
path: './sources/dataverse/dataverse-proxy', | |
name: 'source-dataverse-proxy' | |
}, | |
{ | |
label: 'EventHub Reactivator', | |
path: './sources/eventhub/eventhub-reactivator', | |
name: 'source-eventhub-reactivator' | |
}, | |
{ | |
label: 'EventHub Proxy', | |
path: './sources/eventhub/eventhub-proxy', | |
name: 'source-eventhub-proxy' | |
}, | |
{ | |
label: 'Kubernetes Reactivator', | |
path: './sources/kubernetes/kubernetes-reactivator', | |
name: 'source-kubernetes-reactivator' | |
}, | |
{ | |
label: 'Kubernetes Proxy', | |
path: './sources/kubernetes/kubernetes-proxy', | |
name: 'source-kubernetes-proxy' | |
}, | |
# Reaction Components | |
{ | |
label: 'SignalR', | |
path: 'reactions/signalr/signalr-reaction', | |
name: 'reaction-signalr' | |
}, | |
{ | |
label: 'Dataverse', | |
path: './reactions/power-platform/dataverse/dataverse-reaction', | |
name: 'reaction-dataverse' | |
}, | |
{ | |
label: 'Debezium', | |
path: './reactions/debezium/debezium-reaction', | |
name: 'reaction-debezium' | |
}, | |
{ | |
label: 'Debug', | |
path: './reactions/platform/debug-reaction', | |
name: 'reaction-debug' | |
}, | |
{ | |
label: 'EventGrid', | |
path: './reactions/azure/eventgrid-reaction', | |
name: 'reaction-eventgrid' | |
}, | |
{ | |
label: 'Gremlin', | |
path: './reactions/gremlin/gremlin-reaction', | |
name: 'reaction-gremlin' | |
}, | |
{ | |
label: 'Result', | |
path: './reactions/platform/result-reaction', | |
name: 'reaction-result' | |
}, | |
{ | |
label: 'StorageQueue', | |
path: './reactions/azure/storagequeue-reaction', | |
name: 'reaction-storage-queue' | |
}, | |
{ | |
label: 'StoredProc', | |
path: './reactions/sql/storedproc-reaction', | |
name: 'reaction-storedproc' | |
}, | |
{ | |
label: 'SyncDaprStateStore', | |
path: './reactions/dapr/sync-statestore', | |
name: 'reaction-sync-dapr-statestore' | |
}, | |
{ | |
label: 'PostDaprPubSub', | |
path: './reactions/dapr/post-pubsub', | |
name: 'reaction-post-dapr-pubsub' | |
}, | |
{ | |
label: 'Http', | |
path: './reactions/http', | |
name: 'reaction-http' | |
}, | |
{ | |
label: 'EventBridge', | |
path: './reactions/aws/eventbridge-reaction', | |
name: 'reaction-eventbridge' | |
}, | |
{ | |
label: 'SyncSemanticKernelVectorStore', | |
path: './reactions/semantickernel/sync-vectorstore', | |
name: 'reaction-sync-semantickernel-vectorstore' | |
} | |
] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
with: | |
submodules: true | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3.2.0 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db # v3.6.1 | |
with: | |
install: true | |
- name: Cache Docker layers | |
uses: actions/cache@v4 | |
with: | |
path: /tmp/.buildx-cache | |
key: buildx-${{ matrix.variant.name }}-${{ matrix.component.name }} | |
restore-keys: | | |
buildx-${{ matrix.variant.name }}-${{ matrix.component.name }} | |
- name: Build ${{ matrix.variant.name }} variant | |
run: | | |
cd ${{ matrix.component.path }} | |
BUILD_CONFIG=${{ matrix.variant.build_config }} DOCKERX_OPTS="--output type=docker,dest=${{ github.workspace }}/${{ matrix.component.name }}-${{ matrix.variant.name }}.tar --cache-to type=local,dest=/tmp/.buildx-cache,mode=max --cache-from type=local,src=/tmp/.buildx-cache" make | |
- name: Upload artifact | |
uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6 | |
with: | |
name: image-${{ matrix.component.name }}-${{ matrix.variant.name }} | |
path: ${{ github.workspace }}/${{ matrix.component.name }}-${{ matrix.variant.name }}.tar | |
build-cli: | |
permissions: | |
packages: write | |
contents: read | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
- name: Set up Go | |
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0 | |
with: | |
go-version: '1.21' | |
- name: Cache Go modules | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/go/pkg/mod | |
~/.cache/go-build | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
- name: Build | |
working-directory: cli | |
run: make | |
- name: Upload artifact | |
uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6 | |
with: | |
name: cli | |
path: cli/bin | |
test-source-sdks: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '21' | |
distribution: 'temurin' | |
- name: Test Java SDK | |
run: | | |
cd sources/sdk/java | |
make test | |
- name: Test .NET SDK | |
run: | | |
cd sources/sdk/dotnet | |
make test | |
- name: Install protoc | |
run: sudo apt-get update && sudo apt-get install -y protobuf-compiler | |
- name: Test Rust SDK | |
run: | | |
cd sources/sdk/rust | |
make test | |
e2e-tests: | |
permissions: | |
packages: write | |
contents: read | |
runs-on: e2e-tester | |
needs: | |
- build-images | |
- build-cli | |
strategy: | |
matrix: | |
variant: [ | |
{ | |
name: 'default', | |
drasi_version: 'latest' | |
}, | |
{ | |
name: 'azure-linux', | |
drasi_version: 'latest-azure-linux' | |
} | |
# Future variants can be added here | |
] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
- name: Download CLI | |
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | |
with: | |
name: cli | |
path: cli | |
- name: Install Drasi CLI | |
run: | | |
chmod +x ./cli/linux-x64/drasi | |
sudo mv ./cli/linux-x64/drasi /usr/local/bin/drasi | |
- name: Download ${{ matrix.variant.name }} images | |
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | |
with: | |
path: images | |
pattern: image-*-${{ matrix.variant.name }} | |
merge-multiple: true | |
- name: Load Docker images | |
run: | | |
find ./images -name "*.tar" | while read -r FILE; do | |
echo "Processing $FILE..." | |
docker load -i $FILE | |
echo "Loaded $(basename "$FILE" .gz) into Docker." | |
done | |
- name: Install Kind | |
run: | | |
curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.17.0/kind-linux-amd64 | |
chmod +x ./kind | |
sudo mv ./kind /usr/local/bin/kind | |
- name: Install Kubectl | |
run: | | |
curl -LO "https://dl.k8s.io/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl" | |
chmod +x ./kubectl | |
sudo mv ./kubectl /usr/local/bin/kubectl | |
- name: npm install | |
working-directory: e2e-tests | |
run: npm install | |
- name: Run e2e tests (${{ matrix.variant.name }}) | |
working-directory: e2e-tests | |
env: | |
DRASI_VERSION: ${{ matrix.variant.drasi_version }} | |
E2E_SK_SYNC_VECTORSTORE_AZURE_OPENAI_KEY: ${{ secrets.E2E_SK_SYNC_VECTORSTORE_AZURE_OPENAI_KEY }} | |
E2E_SK_SYNC_VECTORSTORE_AZURE_OPENAI_ENDPOINT: ${{ secrets.E2E_SK_SYNC_VECTORSTORE_AZURE_OPENAI_ENDPOINT }} | |
E2E_SK_SYNC_VECTORSTORE_AZURE_OPENAI_EMBEDDING_MODEL: ${{ secrets.E2E_SK_SYNC_VECTORSTORE_AZURE_OPENAI_EMBEDDING_MODEL }} | |
run: npm test | |