Skip to content
This repository has been archived by the owner on Nov 13, 2024. It is now read-only.

Ci system tests #39

Merged
merged 4 commits into from
Sep 10, 2023
Merged

Ci system tests #39

merged 4 commits into from
Sep 10, 2023

Conversation

igiloh-pinecone
Copy link
Contributor

Problem

System tests not running in CI

Solution

  • Set random index name
  • Add pytest-xdist to run tests in parallel
  • Set all KB tests to run in the same worker, since they all need the same index, which is created once

Type of Change

  • New feature (non-breaking change which adds functionality)

Test Plan

That's the whole point...

So we can run tests in parallel == faster
I set all the KB tests to run in one pytest-xdist process, so they will run one after the other - since they are all using the same index
Otherwise we get very ugly reports
I accidentally distributed the unit tests with python-xdist, instead of the slow system tests
@igiloh-pinecone igiloh-pinecone changed the base branch from int_context_tokens to dev September 10, 2023 12:32
@@ -18,6 +18,7 @@ pinecone-text = "^0.5.3"
flake8-pyproject = "^1.2.3"
pandas-stubs = "^2.0.3.230814"
langchain = "^0.0.188"
pytest-xdist = "^3.3.1"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't this one be under the dev dependencies?

@@ -46,11 +46,17 @@ jobs:
version: 1.3.2
- name: install dependencies
run: poetry install --with dev --all-extras
- name: Run pytest
run: poetry run pytest -v --html=report.html tests/unit
- name: Run unit tests
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that we restrict in the toml the python to be ^3.9 and the matrix starts from 3.8 so:

  1. we should remove 3.8 from the matrix
  2. the CI automatically finds an env that compatible so for 3.8 it actually use 3.10. We should restrict that since we want to make sure we actually test on the env we think we are testing

@igiloh-pinecone igiloh-pinecone merged commit b0dbfd5 into dev Sep 10, 2023
5 checks passed
@igiloh-pinecone igiloh-pinecone deleted the ci_system_tests branch September 10, 2023 19:42
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants