From 4eb40b259606735c4542357d28eaafd435dbac27 Mon Sep 17 00:00:00 2001 From: KevKibe Date: Tue, 14 May 2024 11:32:27 +0300 Subject: [PATCH] refactor: split tests into 3 runners --- ...yaml => test_cohere_pinecone_indexer.yaml} | 6 +--- .../test_google_pinecone_indexer.yaml | 29 +++++++++++++++++++ .../test_openai_pinecone_indexer.yaml | 29 +++++++++++++++++++ 3 files changed, 59 insertions(+), 5 deletions(-) rename .github/workflows/{tests.yaml => test_cohere_pinecone_indexer.yaml} (75%) create mode 100644 .github/workflows/test_google_pinecone_indexer.yaml create mode 100644 .github/workflows/test_openai_pinecone_indexer.yaml diff --git a/.github/workflows/tests.yaml b/.github/workflows/test_cohere_pinecone_indexer.yaml similarity index 75% rename from .github/workflows/tests.yaml rename to .github/workflows/test_cohere_pinecone_indexer.yaml index c0d31b0..b9d2432 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/test_cohere_pinecone_indexer.yaml @@ -1,4 +1,4 @@ -name: Tests +name: CoherePineconeIndexer Tests on: [pull_request] @@ -23,11 +23,7 @@ jobs: - name: Test with pytest env: PINECONE_API_KEY: ${{ secrets.PINECONE_API_KEY }} - GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }} - OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} COHERE_API_KEY: ${{ secrets.COHERE_API_KEY }} run: | - pytest src/tests/openaiindex_test.py - pytest src/tests/googleindex_test.py pytest src/tests/cohereindex_test.py \ No newline at end of file diff --git a/.github/workflows/test_google_pinecone_indexer.yaml b/.github/workflows/test_google_pinecone_indexer.yaml new file mode 100644 index 0000000..22fc4b9 --- /dev/null +++ b/.github/workflows/test_google_pinecone_indexer.yaml @@ -0,0 +1,29 @@ +name: GooglePineconeIndexer Tests + +on: [pull_request] + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.11' + + - name: Install dependencies + run: | + pip install -r requirements.txt --no-cache-dir + pip install pytest einops lion-pytorch + + - name: Test with pytest + env: + PINECONE_API_KEY: ${{ secrets.PINECONE_API_KEY }} + GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }} + run: | + pytest src/tests/googleindex_test.py + \ No newline at end of file diff --git a/.github/workflows/test_openai_pinecone_indexer.yaml b/.github/workflows/test_openai_pinecone_indexer.yaml new file mode 100644 index 0000000..936472b --- /dev/null +++ b/.github/workflows/test_openai_pinecone_indexer.yaml @@ -0,0 +1,29 @@ +name: OpenaiPineconeIndexer Tests + +on: [pull_request] + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.11' + + - name: Install dependencies + run: | + pip install -r requirements.txt --no-cache-dir + pip install pytest einops lion-pytorch + + - name: Test with pytest + env: + PINECONE_API_KEY: ${{ secrets.PINECONE_API_KEY }} + OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} + run: | + pytest src/tests/openaiindex_test.py + \ No newline at end of file