feat(plugin): add model-sse-streaming plugin and rename sse-streaming… #1039
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
| name: Integration Test | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| integration-test: | |
| name: Integration test | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| component: | |
| [mgmt-backend, pipeline-backend, model-backend, artifact-backend] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Free disk space | |
| uses: jlumbroso/free-disk-space@main | |
| with: | |
| tool-cache: false | |
| android: true | |
| dotnet: true | |
| haskell: true | |
| large-packages: true | |
| docker-images: true | |
| swap-storage: false | |
| - name: Restart docker | |
| run: sudo service docker restart | |
| - name: Checkout repo (instill-core) | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: instill-ai/instill-core | |
| ref: main | |
| path: instill-core | |
| - name: Load .env file (instill-core) | |
| uses: cardinalby/export-env-action@v2 | |
| with: | |
| envFile: ./instill-core/.env | |
| - name: Checkout (api-gateway) | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: instill-ai/api-gateway | |
| ref: ${{ github.event.pull_request.head.sha }} | |
| path: api-gateway | |
| - name: Load .env file (api-gateway) | |
| uses: cardinalby/export-env-action@v2 | |
| with: | |
| envFile: ./api-gateway/.env | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: ${{ env.GOLANG_VERSION }} | |
| - name: Install k6 | |
| run: | | |
| go install go.k6.io/xk6/cmd/xk6@v${{ env.XK6_VERSION }} | |
| xk6 build v${{ env.K6_VERSION }} \ | |
| --with github.com/grafana/xk6-sql@v${{ env.XK6_SQL_VERSION }} \ | |
| --with github.com/grafana/xk6-sql-driver-postgres@v${{ env.XK6_SQL_POSTGRES_VERSION }} \ | |
| --with github.com/grafana/xk6-exec@latest && sudo cp k6 /usr/bin | |
| - name: Install MinIO Client | |
| if: matrix.component == 'artifact-backend' | |
| run: | | |
| curl -fsSL https://dl.min.io/client/mc/release/linux-amd64/mc -o mc | |
| chmod +x mc | |
| sudo mv mc /usr/bin/mc | |
| - name: Install Python dependencies for integration tests | |
| if: matrix.component == 'artifact-backend' | |
| run: | | |
| python3 -m pip install --upgrade pip | |
| pip3 install pymilvus>=2.4.3 | |
| - name: Login to Docker Hub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: dropletbot | |
| password: ${{ secrets.BOTDOCKERHUBPERSONALACCESSTOKEN }} | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Set short commit SHA | |
| run: | | |
| echo "COMMIT_SHORT_SHA=${GITHUB_SHA:0:7}" >> $GITHUB_ENV | |
| - name: Build image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: api-gateway | |
| load: true | |
| build-args: | | |
| GOLANG_VERSION=${{ env.GOLANG_VERSION }} | |
| ALPINE_VERSION=${{ env.ALPINE_VERSION }} | |
| KRAKEND_CE_VERSION=${{ env.KRAKEND_CE_VERSION }} | |
| SERVICE_NAME=${{ env.SERVICE_NAME }} | |
| SERVICE_VERSION=${{ env.COMMIT_SHORT_SHA }} | |
| tags: instill/api-gateway:${{ env.COMMIT_SHORT_SHA }} | |
| cache-from: | | |
| type=registry,ref=instill/api-gateway:buildcache | |
| cache-to: | | |
| type=registry,ref=instill/api-gateway:buildcache,mode=max | |
| - name: Launch Instill Core CE (commit hash) | |
| working-directory: instill-core | |
| run: | | |
| # CFG_COMPONENT_SECRETS_GITHUB* variables are injected to test OAuth | |
| # connection creation on `pipeline-backend`. | |
| if [ "${{ matrix.component }}" = "artifact-backend" ]; then | |
| f=".env.secrets.component.test" | |
| printf 'CFG_COMPONENT_SECRETS_OPENAI_APIKEY=%s\n' "${{ secrets.OPENAIAPIKEY }}" >> "$f" | |
| printf 'CFG_RAG_MODEL_OPENAI_APIKEY=%s\n' "${{ secrets.OPENAIAPIKEY }}" >> "$f" | |
| printf 'CFG_RAG_MODEL_GEMINI_APIKEY=%s\n' "${{ secrets.GEMINIAPIKEY }}" >> "$f" | |
| fi | |
| make compose-dev EDITION=local-ce:test ENV_SECRETS_COMPONENT=.env.secrets.component.test API_GATEWAY_VERSION=${{ env.COMMIT_SHORT_SHA }} | |
| - name: Run ${{ matrix.component }} integration test (commit hash) | |
| env: | |
| MINIO_HOST: ${{ matrix.component == 'artifact-backend' && 'localhost' || '' }} | |
| MINIO_PORT: ${{ matrix.component == 'artifact-backend' && '19000' || '' }} | |
| MILVUS_HOST: ${{ matrix.component == 'artifact-backend' && 'localhost' || '' }} | |
| MILVUS_PORT: ${{ matrix.component == 'artifact-backend' && '19530' || '' }} | |
| run: | | |
| git clone https://github.com/instill-ai/${{ matrix.component }}.git | |
| cd ${{ matrix.component }} | |
| make integration-test API_GATEWAY_URL=localhost:${API_GATEWAY_PORT} | |
| - name: Tear down Instill Core CE | |
| if: always() | |
| working-directory: instill-core | |
| run: | | |
| make down |