Skip to content

Fix hybrid search duplicate test error #323

Fix hybrid search duplicate test error

Fix hybrid search duplicate test error #323

# This workflow kickoffs cloud integration tests on pull request review
# from a person that has write access to the repo.
# It will then spin up indexes, run tox tests, and delete the indexes.
# There is also manual trigger to the workflow in which user can specify
# which job to run. Either delete_all_indexes or run_integration_tests.
# Keep in mind that delete_all_indexes will delete ALL indexes in the
# integration tests account that starts with the prefix "test_index".
name: Cloud Integration Tests
on:
workflow_dispatch:
inputs:
job_to_run:
description: 'Job to run (Options: delete_all_indexes, run_integration_tests). Keep in mind
that delete_all_indexes will delete ALL indexes in the integration tests account that starts
with the prefix "test_index". Even those that were not created by this workflow.'
required: true
default: 'run_integration_tests'
pull_request:
branches:
- mainline
- 'releases/*'
# allows other workflows to reuse these unit tests:
workflow_call:
permissions:
contents: read
jobs:
integration_tests:
name: Cloud Integration Tests
runs-on: ubuntu-latest
if: ${{ github.event.inputs.job_to_run == 'run_integration_tests' || github.event_name != 'workflow_dispatch' }}
environment: cloud-tests
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: "3.8"
cache: "pip"
- name: Install tox
run: pip install tox
- name: Run tox
env:
# TODO change back to PROD once marqo v2 is in prod
MARQO_URL: ${{ secrets.STAGING_CLOUD_MARQO_URL }}
MARQO_CLOUD_URL: ${{ secrets.STAGING_CLOUD_MARQO_URL }}
MARQO_API_KEY: ${{ secrets.STAGING_CLOUD_MARQO_API_KEY }}
run: tox -e cloud_tests -- create-indexes=True use-unique-identifier=True delete-indexes=True
cleanup_indexes:
name: Cleanup cloud indexes
runs-on : ubuntu-latest
if: ${{ github.event.inputs.job_to_run == 'delete_all_indexes' }}
environment: cloud-tests
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: "3.8"
cache: "pip"
- name: Install dependencies
run: pip install -r requirements.txt
- name: Run cleanup_indexes.py
env:
# TODO change back to PROD once marqo v2 is in prod
MARQO_URL: ${{ secrets.STAGING_CLOUD_MARQO_URL }}
MARQO_CLOUD_URL: ${{ secrets.STAGING_CLOUD_MARQO_URL }}
MARQO_API_KEY: ${{ secrets.STAGING_CLOUD_MARQO_API_KEY }}
run: python tests/cloud_test_logic/delete_all_cloud_test_indexes.py