fix poetry
This commit is contained in:
parent
d5024cbe88
commit
3d1afe74ed
1 changed files with 8 additions and 76 deletions
84
.github/workflows/test_common.yml
vendored
84
.github/workflows/test_common.yml
vendored
|
|
@ -24,21 +24,8 @@ jobs:
|
|||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
# os: ["ubuntu-latest", "macos-latest"]
|
||||
os: ["ubuntu-latest"]
|
||||
steps:
|
||||
# - name: Install Docker
|
||||
# run: |
|
||||
# HOMEBREW_NO_AUTO_UPDATE=1 brew install --cask docker
|
||||
# sudo /Applications/Docker.app/Contents/MacOS/Docker --unattended --install-privileged-components
|
||||
# open -a /Applications/Docker.app --args --unattended --accept-license
|
||||
# echo "We are waiting for Docker to be up and running. It can take over 2 minutes..."
|
||||
# while ! /Applications/Docker.app/Contents/Resources/bin/docker info &>/dev/null; do sleep 1; done
|
||||
# if: runner.os == 'macOS'
|
||||
|
||||
# - name: Set up QEMU
|
||||
# uses: docker/setup-qemu-action@v3
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
|
|
@ -49,16 +36,13 @@ jobs:
|
|||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: ["ubuntu-latest"] #, "windows-latest", "macos-latest"
|
||||
os: ["ubuntu-latest"]
|
||||
python-version: ["3.11.x"]
|
||||
# Test all python versions on ubuntu only
|
||||
include:
|
||||
- python-version: "3.9.x"
|
||||
os: "ubuntu-22.04"
|
||||
- python-version: "3.10.x"
|
||||
os: "ubuntu-22.04"
|
||||
# - python-version: "3.12.x"
|
||||
# os: "ubuntu-latest"
|
||||
|
||||
defaults:
|
||||
run:
|
||||
|
|
@ -75,6 +59,11 @@ jobs:
|
|||
- postgres_data:/var/lib/postgresql/data
|
||||
ports:
|
||||
- 5432:5432
|
||||
options: >-
|
||||
--health-cmd="pg_isready -U $POSTGRES_USER"
|
||||
--health-interval=10s
|
||||
--health-timeout=5s
|
||||
--health-retries=5
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
|
|
@ -100,7 +89,6 @@ jobs:
|
|||
shell: cmd
|
||||
|
||||
- name: Install Poetry
|
||||
# https://github.com/snok/install-poetry#running-on-windows
|
||||
uses: snok/install-poetry@v1.3.2
|
||||
with:
|
||||
virtualenvs-create: true
|
||||
|
|
@ -118,7 +106,7 @@ jobs:
|
|||
- name: Wait for PostgreSQL to be ready
|
||||
run: |
|
||||
echo "Waiting for PostgreSQL to be ready..."
|
||||
until pg_isready -h localhost -p 5432 -U cognee; do
|
||||
until docker exec ${RUNNER_USER_NAME}-postgres pg_isready -U cognee; do
|
||||
sleep 1
|
||||
done
|
||||
|
||||
|
|
@ -155,62 +143,6 @@ jobs:
|
|||
cd dist
|
||||
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:
|
||||
name: common | common tests
|
||||
needs: run_common
|
||||
|
|
@ -220,4 +152,4 @@ jobs:
|
|||
- name: Check matrix job results
|
||||
if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')
|
||||
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