fix tests
This commit is contained in:
parent
c76652a368
commit
7f9a1031ee
1 changed files with 64 additions and 8 deletions
72
.github/workflows/test_common.yml
vendored
72
.github/workflows/test_common.yml
vendored
|
|
@ -24,6 +24,7 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
|
# os: ["ubuntu-latest", "macos-latest"]
|
||||||
os: ["ubuntu-latest"]
|
os: ["ubuntu-latest"]
|
||||||
steps:
|
steps:
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
|
|
@ -36,13 +37,16 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: ["ubuntu-latest"]
|
os: ["ubuntu-latest"] #, "windows-latest", "macos-latest"
|
||||||
python-version: ["3.11.x"]
|
python-version: ["3.11.x"]
|
||||||
|
# Test all python versions on ubuntu only
|
||||||
include:
|
include:
|
||||||
- python-version: "3.9.x"
|
- python-version: "3.9.x"
|
||||||
os: "ubuntu-22.04"
|
os: "ubuntu-22.04"
|
||||||
- python-version: "3.10.x"
|
- python-version: "3.10.x"
|
||||||
os: "ubuntu-22.04"
|
os: "ubuntu-22.04"
|
||||||
|
# - python-version: "3.12.x"
|
||||||
|
# os: "ubuntu-latest"
|
||||||
|
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
|
|
@ -59,11 +63,6 @@ jobs:
|
||||||
- postgres_data:/var/lib/postgresql/data
|
- postgres_data:/var/lib/postgresql/data
|
||||||
ports:
|
ports:
|
||||||
- 5432:5432
|
- 5432:5432
|
||||||
options: >-
|
|
||||||
--health-cmd="pg_isready -U $POSTGRES_USER"
|
|
||||||
--health-interval=10s
|
|
||||||
--health-timeout=5s
|
|
||||||
--health-retries=5
|
|
||||||
|
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
|
|
@ -89,6 +88,7 @@ jobs:
|
||||||
shell: cmd
|
shell: cmd
|
||||||
|
|
||||||
- name: Install Poetry
|
- name: Install Poetry
|
||||||
|
# https://github.com/snok/install-poetry#running-on-windows
|
||||||
uses: snok/install-poetry@v1.3.2
|
uses: snok/install-poetry@v1.3.2
|
||||||
with:
|
with:
|
||||||
virtualenvs-create: true
|
virtualenvs-create: true
|
||||||
|
|
@ -106,7 +106,7 @@ jobs:
|
||||||
- name: Wait for PostgreSQL to be ready
|
- name: Wait for PostgreSQL to be ready
|
||||||
run: |
|
run: |
|
||||||
echo "Waiting for PostgreSQL to be ready..."
|
echo "Waiting for PostgreSQL to be ready..."
|
||||||
until docker run --rm --network container:${{ services.postgres.id }} postgres:latest pg_isready -U cognee; do
|
until pg_isready -h localhost -p 5432 -U cognee; do
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
@ -143,6 +143,62 @@ jobs:
|
||||||
cd dist
|
cd dist
|
||||||
pip install *.whl
|
pip install *.whl
|
||||||
|
|
||||||
|
# - run: |
|
||||||
|
# poetry run
|
||||||
|
# if: runner.os != 'Windows'
|
||||||
|
# name: Run common tests with minimum dependencies Linux/MAC
|
||||||
|
# env:
|
||||||
|
# OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
||||||
|
# QDRANT_API_KEY: ${{ secrets.QDRANT_API_KEY }}
|
||||||
|
# QDRANT_API_URL: ${{ secrets.QDRANT_API_URL }}
|
||||||
|
|
||||||
|
# - run: |
|
||||||
|
# poetry run python ./cognee/tests/test_library.py
|
||||||
|
# if: runner.os == 'Windows'
|
||||||
|
# name: Run common tests with minimum dependencies Windows
|
||||||
|
# env:
|
||||||
|
# OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
||||||
|
# QDRANT_API_KEY: ${{ secrets.QDRANT_API_KEY }}
|
||||||
|
# QDRANT_API_URL: ${{ secrets.QDRANT_API_URL }}
|
||||||
|
# shell: cmd
|
||||||
|
|
||||||
|
# - name: Install dependencies
|
||||||
|
# run: poetry install --no-interaction
|
||||||
|
|
||||||
|
# - name: Build with Poetry
|
||||||
|
# run: poetry build
|
||||||
|
|
||||||
|
# - name: Install Package
|
||||||
|
# run: |
|
||||||
|
# cd dist
|
||||||
|
# pip install *.whl
|
||||||
|
|
||||||
|
# - name: Download NLTK Punkt Tokenizer Models
|
||||||
|
# run: |
|
||||||
|
# python -m nltk.downloader punkt
|
||||||
|
# - run: |
|
||||||
|
# poetry run python ./cognee/tests/test_library.py
|
||||||
|
# if: runner.os != 'Windows'
|
||||||
|
# name: Run pipeline smoke tests with minimum deps Linux/MAC
|
||||||
|
# env:
|
||||||
|
# OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
||||||
|
# QDRANT_API_KEY: ${{ secrets.QDRANT_API_KEY }}
|
||||||
|
# QDRANT_API_URL: ${{ secrets.QDRANT_API_URL }}
|
||||||
|
|
||||||
|
# - name: Download NLTK Punkt Tokenizer Models
|
||||||
|
# run: |
|
||||||
|
# python -m nltk.downloader punkt
|
||||||
|
# - run: |
|
||||||
|
# poetry run python ./cognee/tests/test_library.py
|
||||||
|
# if: runner.os == 'Windows'
|
||||||
|
# name: Run smoke tests with minimum deps Windows
|
||||||
|
# env:
|
||||||
|
# OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
||||||
|
# QDRANT_API_KEY: ${{ secrets.QDRANT_API_KEY }}
|
||||||
|
# QDRANT_API_URL: ${{ secrets.QDRANT_API_URL }}
|
||||||
|
# shell: cmd
|
||||||
|
|
||||||
|
|
||||||
matrix_job_required_check:
|
matrix_job_required_check:
|
||||||
name: common | common tests
|
name: common | common tests
|
||||||
needs: run_common
|
needs: run_common
|
||||||
|
|
@ -152,4 +208,4 @@ jobs:
|
||||||
- name: Check matrix job results
|
- name: Check matrix job results
|
||||||
if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')
|
if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')
|
||||||
run: |
|
run: |
|
||||||
echo "One or more matrix job tests failed or were cancelled. You may need to re-run them." && exit 1
|
echo "One or more matrix job tests failed or were cancelled. You may need to re-run them." && exit 1
|
||||||
Loading…
Add table
Reference in a new issue