This repository has been archived by the owner on Nov 13, 2024. It is now read-only.
support specify Milvus database and upsert #78
This file contains 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: Test (es2milvus2x) on pull request | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'asap/**' | |
- 'cmd/**' | |
- 'configs/**' | |
- 'core/**' | |
- 'internal/**' | |
- 'server/**' | |
- 'starter/**' | |
- 'storage/**' | |
- 'test/**' | |
- 'testfiles/**' | |
- '!**.md' | |
- '.github/workflows/**' | |
- 'deployment/**' | |
pull_request: | |
branches: | |
- main | |
paths: | |
- 'asap/**' | |
- 'cmd/**' | |
- 'configs/**' | |
- 'core/**' | |
- 'internal/**' | |
- 'server/**' | |
- 'starter/**' | |
- 'storage/**' | |
- 'test/**' | |
- 'testfiles/**' | |
- '!**.md' | |
- '.github/workflows/**' | |
- 'deployment/**' | |
workflow_dispatch: | |
jobs: | |
test-milvus-migration-cli-faiss-main: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
deploy_tools: [docker-compose] | |
milvus_2_x_mode: [standalone, cluster] | |
steps: | |
- uses: actions/checkout@main | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 | |
cache: pip | |
- uses: actions/setup-go@v3 | |
with: | |
go-version: '1.22' | |
cache: true | |
- name: Build | |
shell: bash | |
run: | | |
go build | |
- name: Es deploy | |
timeout-minutes: 10 | |
shell: bash | |
working-directory: | |
run: | | |
docker pull docker.elastic.co/elasticsearch/elasticsearch:7.17.12 | |
docker run -d -p 127.0.0.1:9200:9200 -p 127.0.0.1:9300:9300 -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:7.17.12 | |
docker ps | |
- name: Sleep for 60 seconds | |
shell: bash | |
run: | | |
sleep 60s | |
docker ps | |
- name: Install dependency | |
working-directory: testfiles | |
shell: bash | |
run: | | |
pip install -r requirements.txt | |
- name: Insert data to es | |
timeout-minutes: 10 | |
shell: bash | |
run: | | |
python testfiles/es/prepare_data_es.py | |
- name: Milvus 2.x deploy | |
timeout-minutes: 10 | |
shell: bash | |
working-directory: deployment/${{ matrix.milvus_2_x_mode }} | |
run: | | |
docker-compose up -d | |
bash ../../scripts/check_healthy.sh | |
docker-compose ps -a | |
- name: Prepare config | |
shell: bash | |
run: | | |
cp testfiles/es/config/migration.yaml ./ | |
- name: Migration | |
timeout-minutes: 5 | |
shell: bash | |
run: | | |
./milvus-migration start | |
- name: Verify data | |
timeout-minutes: 5 | |
shell: bash | |
run: | | |
python testfiles/testcases/verify_data_es.py |