VectorDB support (pgvector) for archival memory (#226)
This commit is contained in:
40
.github/workflows/sarah-test.yml
vendored
Normal file
40
.github/workflows/sarah-test.yml
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
name: sarah-test
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
EXAMPLE_VAR: "hello_world"
|
||||
PGVECTOR_TEST_DB_URL: ${{ secrets.PGVECTOR_TEST_DB_URL }}
|
||||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
||||
jobs:
|
||||
test:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.10.10 # Set this to your Python version
|
||||
|
||||
- name: Install Poetry
|
||||
run: |
|
||||
pip install poetry
|
||||
- name: Install dependencies using Poetry
|
||||
run: |
|
||||
poetry install
|
||||
- name: Install pexpect for testing the interactive CLI
|
||||
run: |
|
||||
poetry add --dev pexpect
|
||||
- name: Run tests with pytest
|
||||
env:
|
||||
EXAMPLE_VAR: "hello_world"
|
||||
PGVECTOR_TEST_DB_URL: ${{ secrets.PGVECTOR_TEST_DB_URL }}
|
||||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
||||
run: |
|
||||
PGVECTOR_TEST_DB_URL=${{ secrets.PGVECTOR_TEST_DB_URL }} OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY }} poetry run pytest -s -vv tests
|
||||
39
.github/workflows/tests.yml
vendored
39
.github/workflows/tests.yml
vendored
@@ -1,5 +1,9 @@
|
||||
name: MemGPT tests
|
||||
|
||||
env:
|
||||
PGVECTOR_TEST_DB_URL: ${{ secrets.PGVECTOR_TEST_DB_URL }}
|
||||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
@@ -11,26 +15,45 @@ jobs:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
env:
|
||||
PGVECTOR_TEST_DB_URL: ${{ secrets.PGVECTOR_TEST_DB_URL }}
|
||||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v1
|
||||
|
||||
- name: Install poetry
|
||||
run: pipx install poetry
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: 3.10.10 # Set this to your Python version
|
||||
python-version: "3.10"
|
||||
cache: "poetry"
|
||||
|
||||
- name: Install Poetry
|
||||
- name: Set Poetry config
|
||||
run: |
|
||||
pip install poetry
|
||||
poetry config virtualenvs.in-project false
|
||||
poetry config virtualenvs.path ~/.virtualenvs
|
||||
|
||||
- name: Install dependencies using Poetry
|
||||
env:
|
||||
PGVECTOR_TEST_DB_URL: ${{ secrets.PGVECTOR_TEST_DB_URL }}
|
||||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
||||
run: |
|
||||
poetry install
|
||||
|
||||
- name: Install pexpect for testing the interactive CLI
|
||||
- name: Set Poetry config
|
||||
env:
|
||||
PGVECTOR_TEST_DB_URL: ${{ secrets.PGVECTOR_TEST_DB_URL }}
|
||||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
||||
run: |
|
||||
poetry add --dev pexpect
|
||||
poetry config virtualenvs.in-project false
|
||||
poetry config virtualenvs.path ~/.virtualenvs
|
||||
|
||||
- name: Run tests with pytest
|
||||
env:
|
||||
PGVECTOR_TEST_DB_URL: ${{ secrets.PGVECTOR_TEST_DB_URL }}
|
||||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
||||
run: |
|
||||
poetry run pytest -s -vv tests
|
||||
PGVECTOR_TEST_DB_URL=${{ secrets.PGVECTOR_TEST_DB_URL }} OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY }} poetry run pytest -s -vv tests
|
||||
|
||||
Reference in New Issue
Block a user