build: Update all actions to use cached poetry builds (#846)

This commit is contained in:
RT
2024-01-18 13:31:12 -05:00
committed by GitHub
parent 8120d56e67
commit 61897921fd
7 changed files with 44 additions and 86 deletions

View File

@@ -12,15 +12,8 @@ on:
jobs:
test:
runs-on: ubuntu-latest
env:
PGVECTOR_TEST_DB_URL: postgresql+pg8000://memgpt:memgpt@localhost:8888/memgpt
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v4
@@ -33,26 +26,18 @@ jobs:
with:
python-version: "3.11"
poetry-version: "1.7.1"
- name: Set Poetry config
run: |
poetry config virtualenvs.in-project false
poetry config virtualenvs.path ~/.virtualenvs
- name: Install dependencies using Poetry
run: |
poetry install --all-extras
install-args: "--all-extras"
- name: Run tests with pytest
env:
PGVECTOR_TEST_DB_URL: postgresql+pg8000://memgpt:memgpt@localhost:8888/memgpt
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
run: |
PGVECTOR_TEST_DB_URL=postgresql+pg8000://memgpt:memgpt@localhost:8888/memgpt OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY }} poetry run pytest -s -vv -k "not test_storage" tests
poetry run pytest -s -vv -k "not test_storage" tests
- name: Run storage tests
env:
PGVECTOR_TEST_DB_URL: postgresql+pg8000://memgpt:memgpt@localhost:8888/memgpt
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
run: |
PGVECTOR_TEST_DB_URL=postgresql+pg8000://memgpt:memgpt@localhost:8888/memgpt OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY }} poetry run pytest -s -vv tests/test_storage.py
poetry run pytest -s -vv tests/test_storage.py