Skip to content

Commit

Permalink
add master workflow for cloud integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vicilliar committed Sep 9, 2024
1 parent 72e5f81 commit 8983370
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 6 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/cloud-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@ on:
description: 'Number of replicas to use for the cloud tests. Default is 0.'
required: false
default: 0
pull_request:
branches:
- mainline
- 'releases/*'
# allows other workflows to reuse these unit tests:
workflow_call:

Expand Down Expand Up @@ -66,7 +62,9 @@ jobs:
MARQO_API_KEY: ${{ secrets.STAGING_CLOUD_MARQO_API_KEY }}
MARQO_NUMBER_OF_SHARDS: ${{ github.event.inputs.number_of_shards }}
MARQO_NUMBER_OF_REPLICAS: ${{ github.event.inputs.number_of_replicas }}
run: tox -e cloud_tests -- create-indexes=True use-unique-identifier=True delete-indexes=True
run: |
echo "Running with NUMBER_OF_SHARDS=${{ github.event.inputs.number_of_shards }} and NUMBER_OF_REPLICAS=${{ github.event.inputs.number_of_replicas }}"
tox -e cloud_tests -- create-indexes=True use-unique-identifier=True delete-indexes=True
cleanup_indexes:
name: Cleanup cloud indexes
Expand Down
39 changes: 39 additions & 0 deletions .github/workflows/master-cloud-integration-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# This workflow kicks off 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:
pull_request:
branches:
- mainline
- 'releases/*'
# allows other workflows to reuse these unit tests:
workflow_call:

permissions:
contents: read

jobs:
run-0-replica-1-shard-test:
name: Cloud Integration Tests - 0 Replica, 1 Shard
uses: ./.github/workflows/cloud-integration-tests.yml
secrets: inherit
with:
NUMBER_OF_REPLICAS: 0
NUMBER_OF_SHARDS: 1

run-1-replica-2-shard-test:
name: Cloud Integration Tests - 1 Replica, 2 Shards
uses: ./.github/workflows/cloud-integration-tests.yml
secrets: inherit
with:
NUMBER_OF_REPLICAS: 1
NUMBER_OF_SHARDS: 2

2 changes: 1 addition & 1 deletion tests/cloud_test_logic/cloud_test_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def get_env_var_as_int(var_name):
"treatUrlsAndPointersAsImages": True,
"model": "open_clip/ViT-B-32/laion2b_s34b_b79k",

"inferenceType": "marqo.GPU",
"inferenceType": "marqo.CPU.small",
"storageClass": "marqo.performance",
"numberOfReplicas": NUMBER_OF_REPLICAS,
"numberOfShards": NUMBER_OF_SHARDS,
Expand Down

0 comments on commit 8983370

Please sign in to comment.