build: Update all actions to use cached poetry builds (#846)
This commit is contained in:
21
.github/workflows/tests.yml
vendored
21
.github/workflows/tests.yml
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user